The R Project SVN R

Rev

Rev 83769 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 83769 Rev 86513
Line 1... Line 1...
1
% File src/library/methods/man/RMethodUtils.Rd
1
% File src/library/methods/man/RMethodUtils.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 1995-2015 R Core Team
3
% Copyright 1995-2024 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{RMethodUtils}
6
\name{RMethodUtils}
7
\title{Method Utilities}
7
\title{Method Utilities}
8
%% FIXME:  undocumented utilities (Sep. 23/02)
-
 
9
\alias{asMethodDefinition}
-
 
10
\alias{standardGeneric-class}
-
 
11
\alias{standardGenericWithTrace-class}
-
 
12
\alias{nonstandardGeneric-class}
-
 
13
\alias{nonstandardGenericFunction-class}
-
 
14
\alias{nonstandardGroupGenericFunction-class}
-
 
15
\alias{OptionalFunction-class}
-
 
16
\alias{PossibleMethod-class}
-
 
17
\alias{optionalMethod-class}
-
 
18
\alias{derivedDefaultMethod-class}
-
 
19
\alias{internalDispatchMethod-class}
-
 
20
%%
8
%%
21
\alias{substituteFunctionArgs}
9
\alias{substituteFunctionArgs}
22
\alias{makeGeneric}
10
\alias{makeGeneric}
23
\alias{makeStandardGeneric}
11
\alias{makeStandardGeneric}
24
\alias{generic.skeleton}
12
\alias{generic.skeleton}
Line 36... Line 24...
36
\alias{.saveImage}
24
\alias{.saveImage}
37
\alias{cacheMetaData}
25
\alias{cacheMetaData}
38
\alias{cacheGenericsMetaData}
26
\alias{cacheGenericsMetaData}
39
\alias{setPrimitiveMethods}
27
\alias{setPrimitiveMethods}
40
\alias{missingArg}
28
\alias{missingArg}
41
\alias{balanceMethodsList}
29
\alias{balanceMethodsList}% defunct
42
\alias{sigToEnv}
30
\alias{sigToEnv}
43
\alias{rematchDefinition}
31
\alias{rematchDefinition}
44
\alias{isRematched}
32
\alias{isRematched}
45
\alias{unRematchDefinition}
33
\alias{unRematchDefinition}
-
 
34
\alias{asMethodDefinition}
46
\alias{addNextMethod,MethodDefinition-method}
35
\alias{addNextMethod,MethodDefinition-method}
47
\alias{addNextMethod,MethodWithNext-method}
36
\alias{addNextMethod,MethodWithNext-method}
48
\alias{addNextMethod}
37
\alias{addNextMethod}
49
\alias{.valueClassTest}
38
\alias{.valueClassTest}
50
\alias{insertClassMethods}
39
\alias{insertClassMethods}
Line 53... Line 42...
53
\alias{.EmptyPrimitiveSkeletons}
42
\alias{.EmptyPrimitiveSkeletons}
54
\description{
43
\description{
55
  Utility functions to support the definition and use of formal
44
  Utility functions to support the definition and use of formal
56
  methods.  Most of these functions will not normally be called directly
45
  methods.  Most of these functions will not normally be called directly
57
  by the user.
46
  by the user.
-
 
47
 
-
 
48
  Partly, they work with S4 classes which are also normally not for the
-
 
49
  user, see their help page \code{\linkS4class{optionalMethods}}.
-
 
50
  
58
}
51
}
59
\usage{
52
\usage{
60
getGeneric(f, mustFind=FALSE, where, package)
53
getGeneric(f, mustFind=FALSE, where, package)
61
 
54
 
62
getGroup(fdef, recursive, where)
55
getGroup(fdef, recursive, where)
Line 105... Line 98...
105
 
98
 
106
addNextMethod(method, f, mlist, optional, envir)
99
addNextMethod(method, f, mlist, optional, envir)
107
 
100
 
108
insertClassMethods(methods, Class, value, fieldNames, returnAll)
101
insertClassMethods(methods, Class, value, fieldNames, returnAll)
109
 
102
 
110
balanceMethodsList(mlist, args, check = TRUE) # <- deprecated since R 3.2.0
103
balanceMethodsList(mlist, args, check = TRUE) # <- defunct since R 4.5.0
111
 
104
 
112
substituteFunctionArgs(def, newArgs, args = formalArgs(def),
105
substituteFunctionArgs(def, newArgs, args = formalArgs(def),
113
                       silent = FALSE, functionName = "a function") 
106
                       silent = FALSE, functionName = "a function") 
114
 
107
 
115
.valueClassTest(object, classes, fname)
108
.valueClassTest(object, classes, fname)
Line 234... Line 227...
234
      the argument.  (For method dispatch this is fine, because
227
      the argument.  (For method dispatch this is fine, because
235
      computations are done at the beginning of the call.)
228
      computations are done at the beginning of the call.)
236
    }
229
    }
237
 
230
 
238
    \item{\code{balanceMethodsList}:}{
231
    \item{\code{balanceMethodsList}:}{
239
      Used to be called from \code{setMethod()} and is \emph{deprecated}
232
      Used to be called from \code{setMethod()} and is \emph{defunct} since
240
      since \R version 3.2.0.
233
      \R version 4.5.0 (\sQuote{deprecated} \R 3.2.0).
241
    %%   Called from \code{\link{setMethod}} to ensure that all nodes in
234
    %%   Called from \code{\link{setMethod}} to ensure that all nodes in
242
    %%   the list have the same depth (i.e., the same number of levels of
235
    %%   the list have the same depth (i.e., the same number of levels of
243
    %%   arguments).  Balance is needed to ensure that all necessary
236
    %%   arguments).  Balance is needed to ensure that all necessary
244
    %%   arguments are examined when inherited methods are being found and
237
    %%   arguments are examined when inherited methods are being found and
245
    %%   added to the \code{allMethods} slot.  No actual recomputation is
238
    %%   added to the \code{allMethods} slot.  No actual recomputation is