pow: Take a vector to arbitrary power

Description Usage Arguments Details Value See Also

Description

Internal function used by the powers library. Takes vector to an arbitrary power, and may plot the function if indicated.

Usage

1
pow(x, a, plot_it, returnVal, returnPlot)

Arguments

x

The vector to be exponentiated.

a

The exponent.

plot_it

A logical. If TRUE then a plot of the power function is created.

returnVal

A logical. If TRUE then the squared values are returned. Generally TRUE by default for functions that depend on this one.

returnPlot

A logical. If TRUE then the generated plot is returned as an object. If both returnVal and returnPlot are TRUE then the output is a list containing both.

Details

This function is for internal use only. Other functions in the powers library depend on this.

Value

In the case of a numerical input, a vector that is the a-th exponent of x is returned. For strings, the input string is repeated code|a| times. If a is negative, the order of the input string x is also reversed.

See Also

pwr, square, cube, reciprocal, tenvec, negtenvec


HScheiber/powers documentation built on May 22, 2019, 1 p.m.