R/hello_no_checks_no_unit_tests.R

Defines functions add_vectors repeat_hello

#' Repeat the phrase hello world a given number of times
#'
#' @param times_to_print Integer, number of times to print "hello world"
#'
#' @export
repeat_hello <- function(times_to_print){
  print(rep("Hello, world!", times_to_print))
}


#' Return elementwise sum of two vectors of equal length
#'
#' @param vec1 Numeric or logical vector
#' @param vec2 Numeric or logical vector
#'
#' @return Numeric or logical vector
#' @export
add_vectors <- function(vec1, vec2){
  return(vec1 + vec2)
}
Snitkin-Lab-Umich/UnitTestsAndFunctionChecks documentation built on May 19, 2020, 10:50 a.m.