R/hello.R

Defines functions plus_three number_square

Documented in number_square plus_three

#' Add 3 to number
#'
#'This function adds 3 to any given number by taking the number as an argument
#' @param x should be a number not text
#'
#' @return the function will return a number with 3 added to argument.
#' @export
#'
#' @examples plus_three(5)
plus_three <- function(x) {
  x+3
}


#' Calculate square of a number
#'
#'This function returns the square of an number given as argument
#' @param x should be a number not text
#'
#' @return the function will return the square of the argument.
#' @export
#'
#' @examples number_square(5)
number_square <- function(x) {
  x*x
}
mickkygoel/DATA-598-WI20-week-7 documentation built on March 15, 2020, 6:44 a.m.