R/Classes.R

### a class for model environments

setClass("ModelEnv",
    representation(
        env = "environment",
        get = "function",
        set = "function",
        hooks = "list"))

### a class for formulae

setClass("FormulaParts",
    representation(
        formula = "list"
    )
)

### model environments given by formulae       

setClass("ModelEnvFormula", contains = c("ModelEnv", "FormulaParts"))

### A prototype for a model class in R

setClass("StatModelCapabilities",
    representation(
        weights = "logical",
        subset  = "logical"),
    prototype(weights = TRUE, subset = TRUE)
)

setClass("StatModel",
    representation(
        name         = "character",
        dpp          = "function",
        fit          = "function",
        predict      = "function",
        capabilities = "StatModelCapabilities")
)

Try the modeltools package in your browser

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

modeltools documentation built on March 13, 2020, 1:53 a.m.