Closed ignacio82 closed 9 years ago
Use summary()
instead, which returns a data frame without printing it:
---
title: "test"
author: "Ignacio"
output: html_document
---
```{r}
library(printr)
library(microbenchmark)
a1 <- a2 <- a3 <- a4 <- numeric(0)
res <- microbenchmark(a1 <- c(a1, 1),
a2 <- append(a2, 1),
a3[length(a3) + 1] <- 1,
a4[[length(a4) + 1]] <- 1,
times=100L)
summary(res)
Thanks!
I cannot make
printr
andmicrobenchmark
work well together. For example:tbl<-print(res) tbl
print(res)