R/Myfunction1.R

Defines functions myf

Documented in myf

#' Produce list of squares and cubes
#'
#' This is the 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
  obj2 = x^3
  list(square=obj1, cube=obj2)
}
myf(1:3)
Farr1611/Math4753Farr1611 documentation built on Jan. 17, 2020, 12:20 a.m.