| 42333 |
ripley |
1 |
% File src/library/methods/man/setSClass.Rd
|
| 68948 |
ripley |
2 |
% Part of the R package, https://www.R-project.org
|
| 69446 |
ripley |
3 |
% Copyright 1995-2015 R Core Team
|
| 42333 |
ripley |
4 |
% Distributed under GPL 2 or later
|
|
|
5 |
|
| 20620 |
jmc |
6 |
\name{makeClassRepresentation}
|
| 56186 |
murdoch |
7 |
\alias{makeClassRepresentation}
|
| 23531 |
hornik |
8 |
\title{Create a Class Definition}
|
| 15357 |
jmc |
9 |
\description{
|
| 44751 |
maechler |
10 |
Constructs an object of class \code{\linkS4class{classRepresentation}}
|
|
|
11 |
to describe a particular class. Mostly a utility function, but you can
|
| 23531 |
hornik |
12 |
call it to create a class definition without assigning it, as
|
|
|
13 |
\code{\link{setClass}} would do.
|
| 15357 |
jmc |
14 |
}
|
|
|
15 |
\usage{
|
| 20620 |
jmc |
16 |
makeClassRepresentation(name, slots=list(), superClasses=character(),
|
| 23531 |
hornik |
17 |
prototype=NULL, package, validity, access,
|
| 26093 |
jmc |
18 |
version, sealed, virtual=NA, where)
|
| 15357 |
jmc |
19 |
}
|
|
|
20 |
\arguments{
|
| 23531 |
hornik |
21 |
\item{name}{character string name for the class}
|
|
|
22 |
\item{slots}{named list of slot classes as would be supplied to
|
|
|
23 |
\code{setClass}, but \emph{without} the unnamed arguments for
|
|
|
24 |
superClasses if any.}
|
|
|
25 |
\item{superClasses}{what classes does this class extend}
|
|
|
26 |
\item{prototype}{an object providing the default data for the class,
|
| 69446 |
ripley |
27 |
e.g., the result of a call to \code{\link{prototype}}.}
|
| 23531 |
hornik |
28 |
\item{package}{The character string name for the package in which
|
|
|
29 |
the class will be stored; see \code{\link{getPackageName}}.}
|
| 20620 |
jmc |
30 |
\item{validity}{Optional validity method. See
|
| 23531 |
hornik |
31 |
\code{\link{validObject}}, and the discussion of validity methods in
|
|
|
32 |
the reference.}
|
|
|
33 |
\item{access}{Access information. Not currently used.}
|
|
|
34 |
\item{version}{Optional version key for version control. Currently
|
|
|
35 |
generated, but not used.}
|
|
|
36 |
\item{sealed}{Is the class sealed? See \code{\link{setClass}}.}
|
|
|
37 |
\item{virtual}{Is this known to be a virtual class?}
|
| 26093 |
jmc |
38 |
|
|
|
39 |
\item{where}{The environment from which to look for class
|
|
|
40 |
definitions needed (e.g., for slots or superclasses). See the
|
|
|
41 |
discussion of this argument under \link{GenericFunctions}.}
|
| 15357 |
jmc |
42 |
}
|
|
|
43 |
\references{
|
| 46128 |
jmc |
44 |
Chambers, John M. (2008)
|
|
|
45 |
\emph{Software for Data Analysis: Programming with R}
|
|
|
46 |
Springer. (For the R version.)
|
| 15357 |
jmc |
47 |
|
| 46128 |
jmc |
48 |
Chambers, John M. (1998)
|
|
|
49 |
\emph{Programming with Data}
|
|
|
50 |
Springer (For the original S4 version.)
|
| 15357 |
jmc |
51 |
}
|
| 23531 |
hornik |
52 |
\seealso{
|
|
|
53 |
\code{\link{setClass}}
|
|
|
54 |
}
|
| 15357 |
jmc |
55 |
\keyword{programming}
|
|
|
56 |
\keyword{classes}
|