Description Usage Arguments Details Value See Also Examples
This function takes the reciprocal of an input vector, and plots the resultant function if indicated.
1 | reciprocal(x, plot_it = FALSE, returnVal = TRUE, returnPlot = FALSE)
|
x |
The vector to be inversed. |
plot_it |
A logical switch. If TRUE then a quick plot of the power function is created. |
returnVal |
A logical switch. If |
returnPlot |
A logical switch. If |
The function output depends on what inputs are used. In the case of numeric or logical data, the output will simply be the reciprocal of the input.
In the case of characters, the output will be the input string reversed. For character inputs, the plot_it switch does not have any effect.
By selecting returnPlot = TRUE
then the output will contain a plot object. In the case of character vectors, no plot is generated and the plot object is empty.
A vector that is the reciprocal of x
, this output can be supressed with returnVal
. Option to also return a plot object with returnPlot
.
pwr
, square
, cube
, tenvec
, negtenvec
1 2 3 4 5 6 | plot_object <- reciprocal(1:20, plot_it = TRUE, returnVal = FALSE, returnPlot = TRUE)
reciprocal(-5)
reciprocal(-2)
reciprocal(TRUE)
reciprocal(letters)
reciprocal("hello world")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.