R/myf.R

Defines functions myf

Documented in myf

#' My function of squares and cubes
#'
#' Produce list of squares and cubes
#'
#' This is a part of the introduction to package making.
#'
#' @param x a vector
#'
#' @return a list of vectors
#' @export
#'
#' @examples
#' x=1:4;myf(x)
myf = function(x){
  obj1 = x^2 # square a vector
  obj2 = x^3
  list(square=obj1, cube=obj2)
}
loganlch/math4753 documentation built on Jan. 16, 2020, 12:50 a.m.