Note: The real purpose of this R package is for demonstrating how to make an R package.

This is an R package that gives sqrt() some friends by providing other power functions. The purrr package is used under the hood, so that either an (atomic) vector or a list can be input.

Installation

You can install powers from github with:

# install.packages("devtools")
devtools::install_github("vincenzocoia/powers")

Example

See the vignette for more extensive use, but here’s an example:

library(powers)
reciprocal(2)
#> [1] 0.5
cube(list(1, 4, 5))
#> [1]   1  64 125