Note: This package package is only meant for expository purposes – although you might just find it handy!

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)
##  [1]   1   4   9  16  25  36  49  64  81 100
cube(1:10)
##  [1]    1    8   27   64  125  216  343  512  729 1000
##  [1] 1.0000000 0.5000000 0.3333333 0.2500000 0.2000000 0.1666667 0.1428571
##  [8] 0.1250000 0.1111111 0.1000000

List-friendly inputs, as well:

cube(list(1, 4, 5))
## [1]   1  64 125