square_calc.R

#' Calculates the area of a square
#' 
#' @param Side_length length of a side of the square
#' @return area_of_square
#' 
#' @export
#' 

square_calc <- function(side_length){
  assert_that(is.numeric(side_length))
  area <- side_length ^ 2
  assert_that(sqrt(area) == side_length)
  return(area)
}
joshoriv/rivera.package documentation built on Jan. 1, 2021, 5:40 a.m.