inst/example_packages/exampleGood/R/s4_example.R

#' An example S4 class
#'
#' @slot data Some data
#'
S4Example <- setClass("S4Example", representation(data = "list"))

#' Provide names of the data slot in an S4Example object
#'
#' @param x An x
#'
setMethod("names", signature("S4Example"), function(x) {
  names(x@data)
})

Try the checked package in your browser

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

checked documentation built on June 10, 2025, 9:08 a.m.