R/circle_area.R

Defines functions circle_area

Documented in circle_area

#' Calculate the area of a circle given its radius
#'
#' @param r Radius of circle
#'
#' @return Area of circle
#' @export
#'
#' @examples
#' circle_area(1:5)
circle_area<-function(r){
  stopifnot(is.numeric(r))
  pi*r^2
}
HRumgay/myFirstProject documentation built on July 28, 2017, 12:13 a.m.