Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

S3WrapperGenerator

S3 Wrapper Method Generator


Description

Generates S3 wrapper methods for public methods of R6ClassGenerators, but can also be used to generate “plain” function wrappers.

Usage

S3WrapperGenerator(R6Method, self = "x", dots = TRUE)

Arguments

R6Method

An expression with or a public method (function) of an R6ClassGenerator.

self

A character string specifying the name of the parameter which will take the R6 object.

dots

A logical specifying if a ... parameter shall be added as last parameter in case none already exists. This might be required for S3 generic/method consistency.

Value

Returns an S3 method (function).

See Also

Examples

# generate S3 wrapper method for alter of DTSg
alter.DTSg <- S3WrapperGenerator(
  R6Method = DTSg$public_methods$alter
)

DTSg

A Class for Working with Time Series Based on 'data.table' and 'R6' with Largely Optional Reference Semantics

v0.7.0
MIT + file LICENSE
Authors
Gerold Hepp [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.