tests/testthat/testS4Docs/R/a.r

#' An s4 generic
#'
#' @export
#' @aliases multi_method,ANY,ANY-method
setGeneric("multi_method", function(x, y) {
  x
})

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

#' @rdname multi_method
#' @export
setMethod("multi_method", signature(x = "numeric", y = "integer"), function(x, y) {
  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.