R/power.R

Defines functions square cube

Documented in cube square

#' Square a number
#'
#' Takes in any numeric value and squares it.
#' @param x A numeric value to be squared
#' @return The square of the input
#' @export
square <- function(x){
  return(x^2)
}

#' Cube a number
#'
#' Takes in any numeric value and cubes it.
#' @param x A numeric value to be cubed
#' @return The cube of the input
#' @export
cube <- function(x){
  return(x^3)
}
tinoswe/InterLAB documentation built on May 18, 2019, 9:19 p.m.