The R Project SVN R

Rev

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

Rev 62066 Rev 62073
Line 122... Line 122...
122
  It is an error to apply any of these operators to an object which is
122
  It is an error to apply any of these operators to an object which is
123
  not subsettable (e.g. a function).
123
  not subsettable (e.g. a function).
124
}
124
}
125
 
125
 
126
\section{Atomic vectors}{
126
\section{Atomic vectors}{
127
  The usual form of indexing is \code{"["}.  \code{"[["} can be used to
127
  The usual form of indexing is \code{[}.  \code{[[} can be used to
128
  select a single element \emph{dropping} \code{\link{names}}, whereas
128
  select a single element \emph{dropping} \code{\link{names}}, whereas
129
  \code{"["} keeps them, e.g., in \code{c(abc = 123)[1]}.
129
  \code{[} keeps them, e.g., in \code{c(abc = 123)[1]}.
130
 
130
 
131
  The index object \code{i} can be numeric, logical, character or empty.
131
  The index object \code{i} can be numeric, logical, character or empty.
132
  Indexing by factors is allowed and is equivalent to indexing by the
132
  Indexing by factors is allowed and is equivalent to indexing by the
133
  numeric codes (see \code{\link{factor}}) and not by the character
133
  numeric codes (see \code{\link{factor}}) and not by the character
134
  values which are printed (for which use \code{[as.character(i)]}).
134
  values which are printed (for which use \code{[as.character(i)]}).