inst/templates/template_compute_component.R

#' @method compute_{{component}} {{class}}
`compute_{{component}}.{{class}}` <- function(object, ...) {
    ## Write some code to compute the component {{component}} using
    ## the components of object and any other arguments in ...
    ## For example
    cat('component', '{{component}}', 'for objects of class', '{{class}}', "\n")
}


`compute_{{component}}` <- function(object, ...) {
    UseMethod('compute_{{component}}')
}

Try the enrichwith package in your browser

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

enrichwith documentation built on Sept. 9, 2025, 5:36 p.m.