File: Generics.R

package info (click to toggle)
r-cran-modeltools 0.2-24-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 184 kB
  • sloc: sh: 39; makefile: 2
file content (52 lines) | stat: -rw-r--r-- 1,381 bytes parent folder | download | duplicates (4)
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
41
42
43
44
45
46
47
48
49
50
51
52
#
#  Copyright (C) 2006 Torsten Hothorn, Friedrich Leisch
#  $Id: Generics.R 4119 2008-09-22 14:49:39Z leisch $
#



## generics used in flexmix and flexclust which may also be useful in
## other packages

setGeneric("ICL", function(object, ...) standardGeneric("ICL"))

setGeneric("KLdiv", function(object, ...) standardGeneric("KLdiv"))

setGeneric("Lapply", function(object, FUN, ...) standardGeneric("Lapply"))

setGeneric("clusters", function(object, newdata, ...) standardGeneric("clusters"))

setGeneric("getModel", function(object, ...) standardGeneric("getModel"))

setGeneric("parameters", function(object, ...) standardGeneric("parameters"))

setGeneric("posterior", function(object, newdata, ...) standardGeneric("posterior"))

setGeneric("prior", function(object, ...) standardGeneric("prior"))

setGeneric("refit", function(object, newdata, ...) standardGeneric("refit"))

setGeneric("relabel", function(object, by, ...) standardGeneric("relabel"))


###**********************************************************

setGeneric("info",
function(object, which, ...) standardGeneric("info"))

setMethod("info", signature(object="ANY", which="missing"),
function(object, which, ...)
{
    info(object, which="help")
})
    
infoCheck <- function(object, which, ...)
{
    which %in% info(object, "help")
}



###**********************************************************