tests/testthat/testSingleMethod/R/a.r

#' Generic test
#'
#'
#' @param x A parameter
#'
#' @rdname single-method
#'
#' @export
single_method <- function(x) {
  UseMethod("single_method")
}

#' Test default
#'
#' @param x A parameter
#'
#' @rdname single-method-2
#'
#' @export
single_method.default <- function(x) {
  x
}

Try the generics package in your browser

Any scripts or data that you put into this service are public.

generics documentation built on July 6, 2022, 1:08 a.m.