R/hello.R

Defines functions add

Documented in add

#' @useDynLib testing
#' @importFrom Rcpp sourceCpp
NULL

#' Add
#' @param x x
#' @param y y
#' @export
add <- function(x, y = 1) {
  if (!is.numeric(x)) {
    stop("Cannot add non-numbers!")
  }
  add_(x, y)
}
jimhester/testing documentation built on May 19, 2019, 10:33 a.m.