The R Project SVN R

Rev

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

Rev 68948 Rev 71228
Line 1... Line 1...
1
% File src/library/methods/man/showMethods.Rd
1
% File src/library/methods/man/showMethods.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-2016 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{showMethods}
6
\name{showMethods}
7
\alias{showMethods}
7
\alias{showMethods}
8
\alias{.S4methods}
8
\alias{.S4methods}
Line 95... Line 95...
95
  interactive use.
95
  interactive use.
96
}
96
}
97
\examples{
97
\examples{
98
require(graphics)
98
require(graphics)
99
\dontshow{
99
\dontshow{
100
 setClass("track",
-
 
101
          representation(x="numeric", y="numeric"))
100
 setClass("track", slots = c(x="numeric", y="numeric"))
102
 ## First, with only one object as argument:
101
 ## First, with only one object as argument:
103
 setMethod("plot", signature(x="track", y="missing"),
102
 setMethod("plot", signature(x="track", y="missing"),
104
           function(x,  y, ...) plot(slot(x, "x"), slot(x, "y"), ...))
103
           function(x,  y, ...) plot(slot(x, "x"), slot(x, "y"), ...))
105
 ## Second, plot the data from the track on the y-axis against anything
104
 ## Second, plot the data from the track on the y-axis against anything
106
 ## as the x data.
105
 ## as the x data.