knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(LCpackage) library(microbenchmark)
print_date()
add(3, 4) add_cpp(3, 4)
microbenchmark(add(100, 1000), add_cpp(100, 1000))
The Rcpp code is much slower than the base R code!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.