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 71767
Line 2... Line 2...
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-2008 R Core Team
3
% Copyright 1995-2008 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{language-class}
6
\name{language-class}
-
 
7
\title{Classes to Represent Unevaluated Language Objects}
7
\docType{class}
8
\docType{class}
8
\alias{language-class}
9
\alias{language-class}
9
\alias{(-class}
10
\alias{(-class}
10
\alias{<--class}
11
\alias{<--class}
11
\alias{call-class}
12
\alias{call-class}
Line 13... Line 14...
13
\alias{if-class}
14
\alias{if-class}
14
\alias{repeat-class}
15
\alias{repeat-class}
15
\alias{while-class}
16
\alias{while-class}
16
\alias{name-class}
17
\alias{name-class}
17
\alias{\{-class}
18
\alias{\{-class}
18
 
-
 
19
\title{Classes to Represent Unevaluated Language Objects }
-
 
20
\description{  The virtual class \code{"language"} and the specific
19
\description{  The virtual class \code{"language"} and the specific
21
  classes that extend it represent unevaluated objects, as produced for
20
  classes that extend it represent unevaluated objects, as produced for
22
  example by the parser or by functions such as \code{\link{quote}}.
21
  example by the parser or by functions such as \code{\link{quote}}.
23
}
22
}
24
\usage{
23
\usage{
Line 33... Line 32...
33
"for"
32
"for"
34
"if"
33
"if"
35
"repeat"
34
"repeat"
36
"while"
35
"while"
37
"name"
36
"name"
38
"\{"
37
"{"
39
 
38
 
40
### Each of the classes above extends the virtual class
39
### Each of the classes above extends the virtual class
41
"language"
40
"language"
42
}
41
}
43
\section{Objects from the Class}{
42
\section{Objects from the Class}{
44
  \code{"language"} is a virtual class; no objects may be created from
43
  \code{"language"} is a virtual class; no objects may be created from
45
  it.
44
  it.
46
 
45
 
47
Objects from the other classes can be generated by a call to
46
  Objects from the other classes can be generated by a call to
48
\code{new(Class, ...)}, where \code{Class} is the quoted class name, and
47
  \code{new(Class, ...)}, where \code{Class} is the quoted class name, and
49
the \dots arguments are either empty or a \emph{single} object that is
48
  the \dots arguments are either empty or a \emph{single} object that is
50
from this class (or an extension).}
49
  from this class (or an extension).
51
 
-
 
52
 
50
}
53
\section{Methods}{
51
\section{Methods}{
54
  \describe{
52
  \describe{
55
    \item{coerce}{\code{signature(from = "ANY", to = "call")}.  A method
53
    \item{coerce}{\code{signature(from = "ANY", to = "call")}.  A method
56
      exists for \code{as(object, "call")}, calling \code{as.call()}. }
54
      exists for \code{as(object, "call")}, calling \code{as.call()}. }
57
  }
55
  }
-
 
56
}
-
 
57
\examples{
-
 
58
showClass("language")
-
 
59
 
-
 
60
is( quote(sin(x)) ) # "call"  "language"
58
 
61
 
-
 
62
(ff <- new("if"))  ; is(ff) # "if" "language"
-
 
63
(ff <- new("for")) ; is(ff) # "for" "language"
59
}
64
}
60
\keyword{classes}
65
\keyword{classes}