## ------------------------------------------------------------------------
library(powers)
## ------------------------------------------------------------------------
square(1:10)
cube(1:10)
reciprocal(1:10)
## ------------------------------------------------------------------------
my_list <- list(1:10, 0.5, -0.7)
## So base-R-boring!
lapply(my_list, function(x) x^2)
## Use powers instead!
lapply(my_list, square)
## ------------------------------------------------------------------------
reciprocal(1:10, plot_it=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.