Note: This package isn't actually meant to be "serious". I made it just for teaching purposes.

Want to compute powers without having to use ^ or **? Give sqrt some friends by loading the powers package!

library(powers)

Want squares, cubes, or reciprocals? Easy.

square(1:10)
cube(1:10)
quartic(1:10)
reciprocal(1:10)

apply-family friendly, too!

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)

It even comes with the ability to display its output in plot form!

reciprocal(1:10, plot_it=TRUE)

Wow!!!



cheungamanda/powers documentation built on May 29, 2019, noon