R/pow.R

Defines functions pow

Documented in pow

#' Power
#'
#' R equivalent to the power function.
#'
#' Wrapper on `x^n`.
#'
#' @param x A numeric atomic object of the base.
#' @param n A numeric atomic object of the exponent.
#' @return A numeric atomic object of x raised to n.
#' @family translations
#' @export
#' @examples
#' pow(10, 2)
pow <- function(x, n) {
  x^n
}

Try the extras package in your browser

Any scripts or data that you put into this service are public.

extras documentation built on Aug. 5, 2021, 9:07 a.m.