is there any way to transform output of function microbenchmark::microbenchmark
into the data frame or matrix?
For example
v <- rnorm(100)
m <- microbenchmark(mean(v), sum(v))
The 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 this statistics later so I thought about saving the result as data frame. But as.data.frame(m)
doesn't work.
Any help appreciated.