square: Apply a useful power

Description Usage Arguments Details Value Examples

View source: R/square.R

Description

That's it – these functions square, cube, quartic, or take the reciprocal/inverse of a vector.

Usage

1
2
3
4
5
6
7
square(x, plot_it = FALSE)

cube(x, plot_it = FALSE)

quartic(x, plot_it = FALSE)

reciprocal(x, plot_it = FALSE)

Arguments

x

The vector to be squared or cubed.

plot_it

Display a plot of x vs the output. Use logical. FALSE by default.

Details

If you really want to see more, check out the internal pow function that these functions depend on.

Value

A vector that is the:

of x.

Examples

1
2
3
4

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