File: Classes.R

package info (click to toggle)
r-cran-modeltools 0.2-23-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 184 kB
  • sloc: sh: 39; makefile: 2
file content (40 lines) | stat: -rw-r--r-- 845 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

### 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")
)