pow(x, pow = NULL, modulus = FALSE)
x |
Univariate vector, numeric or ts object with only one dimension. |
---|---|
pow |
The nth power. |
modulus | positive |
Returns a vector with the same class and attributes as the input vector.
pow(2, 2)#> [1] 4pow(-2, 2)#> [1] 4pow(-2,2, TRUE)#> [1] -4