tests/testthat/testS7/R/uni.R

#' An S7 generic
#'
#' @param x,y A parameter
#' @export
uni <- S7::new_generic("uni", "x")

#' @rdname uni
S7::method(uni, S7::class_integer) <- function(x, ...) x

#' S7 character method
S7::method(uni, S7::class_character) <- function(x, ...) 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.