tests/testthat/testS4/R/multi.R

#' An s4 generic
#'
#' @export
setGeneric("multi", function(x, y) {
  x
})

#' @rdname multi
#' @export
setMethod("multi", signature(x = "numeric"), function(x, y) {
  x
})

#' @rdname multi
#' @export
setMethod(
  "multi",
  signature(x = "numeric", y = "integer"),
  function(x, y) {
    x
  }
)

#' @export
setMethod("multi", signature(x = "character"), function(x, y) {
  x
})

Try the doclisting package in your browser

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

doclisting documentation built on April 15, 2026, 5:07 p.m.