Is there a way to convert the output of a function microbenchmark::microbenchmarkto a frame or data matrix?
for instance
v <- rnorm(100)
m <- microbenchmark(mean(v), sum(v))
Output
Unit: nanoseconds
expr min lq mean median uq max neval
mean(v) 6568 6979.5 9348.19 7390 7390 54600 100
sum(v) 0 1.0 353.57 411 411 8211 100
I want to use these statistics later, so I thought about saving the result as a data frame. But as.data.frame(m)does not work.
Any help was appreciated.
source
share