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/method.skeleton.Rd
1
% File src/library/methods/man/method.skeleton.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-2007 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{method.skeleton}
6
\name{method.skeleton}
7
\alias{method.skeleton}
7
\alias{method.skeleton}
8
\title{Create a Skeleton File for a New Method}
8
\title{Create a Skeleton File for a New Method}
Line 44... Line 44...
44
}
44
}
45
\seealso{\code{\link{setMethod}}, \code{\link{package.skeleton}}
45
\seealso{\code{\link{setMethod}}, \code{\link{package.skeleton}}
46
}
46
}
47
\examples{
47
\examples{
48
\dontshow{oWD <- setwd(tempdir())}
48
\dontshow{oWD <- setwd(tempdir())}
49
setClass("track", representation(x ="numeric", y="numeric"))
49
setClass("track", slots = c(x ="numeric", y="numeric"))
50
method.skeleton("show", "track")            ## writes show_track.R
50
method.skeleton("show", "track")            ## writes show_track.R
51
method.skeleton("Ops", c("track", "track")) ## writes "Ops_track_track.R"
51
method.skeleton("Ops", c("track", "track")) ## writes "Ops_track_track.R"
52
 
52
 
53
## write multiple method skeletons to one file
53
## write multiple method skeletons to one file
54
con <- file("./Math_track.R", "w")
54
con <- file("./Math_track.R", "w")