pow | R Documentation |
This function raises a value x
to a power
a
. It is useful for improving the readability
of code, clearly separating the base and exponent
from other aspects of an equation.
pow(x, a)
x |
A numeric vector, the base values. |
a |
A numeric vector, the exponents. |
Returns the result of raising x
to
the power a
.
2^4
pow(2, 4)
# Sometimes it can be hard to determine
# what is being raised to a power
x <- 2 * 13^4 / 8
# This function makes it easier to tell
x <- 2 * pow(13, 4) / 8
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.