The R Project SVN R

Rev

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

Rev 30461 Rev 35633
Line 33... Line 33...
33
  (known exceptions are discarded in the code).  Note that the listed
33
  (known exceptions are discarded in the code).  Note that the listed
34
  methods may not be user-visible objects, but often help will be
34
  methods may not be user-visible objects, but often help will be
35
  available for them.
35
  available for them.
36
 
36
 
37
  If \code{class} is used, we check that a matching generic can be found
37
  If \code{class} is used, we check that a matching generic can be found
38
  for each user-visible object named.
38
  for each user-visible object named.  If \code{generic.function} is
-
 
39
  given, there is a warning if it appears not to be a generic function.
-
 
40
  (The check for being generic used can be fooled.)
39
}
41
}
40
\note{
42
\note{
41
  This scheme is called \emph{S3} (S version 3).  For new projects,
43
  This scheme is called \emph{S3} (S version 3).  For new projects,
42
  it is recommended to use the more flexible and robust \emph{S4} scheme
44
  it is recommended to use the more flexible and robust \emph{S4} scheme
43
  provided in the \pkg{methods} package.  Functions can have both S3
45
  provided in the \pkg{methods} package.  Functions can have both S3
Line 56... Line 58...
56
  eds J. M. Chambers and T. J. Hastie, Wadsworth \& Brooks/Cole.
58
  eds J. M. Chambers and T. J. Hastie, Wadsworth \& Brooks/Cole.
57
}
59
}
58
\examples{
60
\examples{
59
methods(summary)
61
methods(summary)
60
methods(class = "aov")
62
methods(class = "aov")
61
methods("[[")    ##- does not list the C-internal ones...
63
methods("[[")    # uses C-internal dispatching
62
methods("$")     # currently none
64
methods("$")
63
methods("$<-")   # replacement function
65
methods("$<-")   # replacement function
64
methods("+")     # binary operator
66
methods("+")     # binary operator
65
methods("Math")  # group generic
67
methods("Math")  # group generic
-
 
68
methods("axis")  # looks like it has methods, but not generic
66
\dontrun{methods(print)
69
\dontrun{methods(print)   # over 100
67
}}
70
}}
68
\keyword{methods}
71
\keyword{methods}