Note: This R package is not mean to be “serious”. It’s just for teaching purposes.
This is an R package that gives sqrt()
friends by providing other
power functions.
You can install powers from github with:
# install.packages("devtools")
devtools::install_github("vincenzocoia/powers")
See the vignette for more extensive use, but here’s an example:
powers::reciprocal(2)
#> [1] 0.5
(Again, I don’t actually intend for anyone to develop this silly package, but if I did, here’s what I’d write.)
Use the internal pow
function as the machinery for the front-end
functions such as square
, cube
, and reciprocal
.