| Line 40... |
Line 40... |
| 40 |
getGenerics(where, searchForm = FALSE)
|
40 |
getGenerics(where, searchForm = FALSE)
|
| 41 |
}
|
41 |
}
|
| 42 |
\section{Summary of Functions}{
|
42 |
\section{Summary of Functions}{
|
| 43 |
\describe{
|
43 |
\describe{
|
| 44 |
\item{\code{isGeneric}:}{
|
44 |
\item{\code{isGeneric}:}{
|
| - |
|
45 |
If \code{fdef} is \code{NULL}, then test if there is a formal
|
| 45 |
Is there a function named \code{f}, and if so, is it a generic?
|
46 |
generic function named \code{f} in the current search path or in
|
| - |
|
47 |
the position specified by \code{where}.
|
| - |
|
48 |
|
| - |
|
49 |
If \code{fdef} is non-\code{NULL}, then test if it is a formal
|
| - |
|
50 |
generic function, with name matching \code{f} if \code{f} is not
|
| - |
|
51 |
missing.
|
| 46 |
|
52 |
|
| 47 |
The \code{getName} argument allows a function to find the name
|
53 |
The \code{getName} argument allows a function to find the name
|
| 48 |
from a function definition. If it is \code{TRUE} then the name of
|
54 |
from a function definition. If it is \code{TRUE} then the name of
|
| 49 |
the generic is returned, or \code{FALSE} if this is not a generic
|
55 |
the generic is returned, or \code{FALSE} if this is not a generic
|
| 50 |
function definition.
|
56 |
function definition.
|
| 51 |
|
57 |
|
| 52 |
The behavior of \code{isGeneric} and \code{\link{getGeneric}} for
|
58 |
The behavior of \code{isGeneric} and \code{\link{getGeneric}} for
|
| 53 |
primitive functions is slightly different. These functions don't
|
59 |
primitive functions is slightly different. These functions don't
|
| 54 |
exist as formal function objects (for efficiency and historical
|
60 |
exist as formal generic function objects (for efficiency and
|
| 55 |
reasons), regardless of whether methods have been defined for
|
61 |
historical reasons), regardless of whether methods have been
|
| 56 |
them. A call to \code{isGeneric} tells you whether methods have
|
- |
|
| 57 |
been defined for this primitive function, anywhere in the current
|
62 |
defined for them. For a primitive function, \code{isGeneric}
|
| 58 |
search list, or in the specified position \code{where}. In
|
63 |
tests whether non-default methods have been defined, whereas
|
| 59 |
contrast, a call to \code{\link{getGeneric}} will return what the
|
64 |
\code{\link{getGeneric}} returns what the formal generic function
|
| 60 |
generic for that function would be, even if no methods have been
|
65 |
object would be, even if no methods have been defined.
|
| 61 |
currently defined for it.
|
- |
|
| 62 |
}
|
66 |
}
|
| 63 |
|
67 |
|
| 64 |
\item{\code{removeGeneric}, \code{removeMethods}:}{
|
68 |
\item{\code{removeGeneric}, \code{removeMethods}:}{
|
| 65 |
Remove all the methods for the generic function of this
|
69 |
Remove all the methods for the generic function of this
|
| 66 |
name. In addition, \code{removeGeneric} removes the function
|
70 |
name. In addition, \code{removeGeneric} removes the function
|