R/sqandsqrt.R

Defines functions sqandsqrt

Documented in sqandsqrt

#' Square Root Function
#'
#' Takes a list of numbers and calculates both their square and square roots.
#'
#' @param x
#'
#' @return a list of squares and their respective roots
#' @export
#'
#' @examples
#' x = 4, then s = 16, and sr = 4
sqandsqrt = function(x){
  x=1:12
  s = x^2
  s
  sr = sqrt(s)
  sr
}
savxsouth/MATH-4753 documentation built on Sept. 4, 2022, 8:17 a.m.