R/BioMath.R

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

#' Cube a number
#'
#' Take 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)
}
Guangyou/rBioLib documentation built on May 6, 2019, 9:03 p.m.