The R Project SVN R

Rev

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

Rev 20092 Rev 23531
Line 15... Line 15...
15
\alias{function-class}
15
\alias{function-class}
16
\alias{ANY-class}
16
\alias{ANY-class}
17
\alias{VIRTUAL-class}
17
\alias{VIRTUAL-class}
18
\alias{missing-class}
18
\alias{missing-class}
19
\title{Classes Corresponding to Basic Data Types }
19
\title{Classes Corresponding to Basic Data Types }
-
 
20
\description{
20
\description{  Formal classes exist corresponding to the basic R data
21
  Formal classes exist corresponding to the basic R data types, allowing
21
  types, allowing these types to be used in method signatures, as slots
22
  these types to be used in method signatures, as slots in class
22
  in class definitions, and to be
-
 
23
  extended by new classes. }
23
  definitions, and to be extended by new classes.}
24
\usage{
24
\usage{
25
### The following are all basic vector classes.
25
### The following are all basic vector classes.
26
### They can appear as class names in method signatures,
26
### They can appear as class names in method signatures,
27
### in calls to as(), is(), and new().
27
### in calls to as(), is(), and new().
28
"character"
28
"character"
Line 45... Line 45...
45
"externalptr" # raw external pointers for use in C code
45
"externalptr" # raw external pointers for use in C code
46
 
46
 
47
"ANY"  # virtual classes used by the methods package itself
47
"ANY"  # virtual classes used by the methods package itself
48
"VIRTUAL"
48
"VIRTUAL"
49
"missing"
49
"missing"
50
 
-
 
51
 
-
 
52
 
-
 
53
}
50
}
54
\section{Objects from the Classes}{
51
\section{Objects from the Classes}{
55
  
-
 
56
Objects can be created by calls of the form \code{new(Class, ...)},
52
  Objects can be created by calls of the form \code{new(Class, ...)},
57
where \code{Class} is the quoted class name, and the remaining arguments
53
  where \code{Class} is the quoted class name, and the remaining
58
if any are objects to be interpreted as vectors of this class.  Multiple
54
  arguments if any are objects to be interpreted as vectors of this
59
arguments will be concatenated.
55
  class.  Multiple arguments will be concatenated.
60
 
56
 
61
The class \code{"expression"} is slightly odd, in that the \dots
57
  The class \code{"expression"} is slightly odd, in that the \dots
62
arguments will \emph{not} be evaluated; therefore, don't enclose them in
58
  arguments will \emph{not} be evaluated; therefore, don't enclose them
63
a call to \code{quote()}.
59
  in a call to \code{quote()}.
64
 
-
 
65
}
60
}
66
 
-
 
67
\section{Extends}{
61
\section{Extends}{
68
Class \code{"vector"}, directly.
62
  Class \code{"vector"}, directly.
69
}
63
}
70
\section{Methods}{
64
\section{Methods}{
71
  \describe{
65
  \describe{
72
    \item{coerce}{Methods are defined to coerce arbitrary objects to
66
    \item{coerce}{Methods are defined to coerce arbitrary objects to
73
      these classes, by calling the corresponding basic function, for
67
      these classes, by calling the corresponding basic function, for