The R Project SVN R

Rev

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

Rev 76125 Rev 76126
Line 108... Line 108...
108
  A character vector of all data sets specified (whether found or not),
108
  A character vector of all data sets specified (whether found or not),
109
  or information about all available data sets in an object of class
109
  or information about all available data sets in an object of class
110
  \code{"packageIQR"} if none were specified.
110
  \code{"packageIQR"} if none were specified.
111
}
111
}
112
\section{Good practice}{
112
\section{Good practice}{
-
 
113
  There is no requirement for \code{data(\var{foo})} to create an object
-
 
114
  named \code{\var{foo}} (nor to create one object), although it much
-
 
115
  reduces confusion if this convention is followed (and it is enforced
-
 
116
  if datasets are lazy-loaded).
-
 
117
  
113
  \code{data()} was originally intended to allow users to load datasets
118
  \code{data()} was originally intended to allow users to load datasets
114
  from packages for use in their examples, and as such it loaded the
119
  from packages for use in their examples, and as such it loaded the
115
  datasets into the workspace \code{\link{.GlobalEnv}}.  This avoided
120
  datasets into the workspace \code{\link{.GlobalEnv}}.  This avoided
116
  having large datasets in memory when not in use.  That need has been
121
  having large datasets in memory when not in use: that need has been
117
  almost entirely superseded by lazy-loading of datasets.
122
  almost entirely superseded by lazy-loading of datasets.
118
 
123
 
119
  The ability to specify a dataset by name (without quotes) is a
124
  The ability to specify a dataset by name (without quotes) is a
120
  convenience: in programming the datasets should be specified by
125
  convenience: in programming the datasets should be specified by
121
  character strings (with quotes).
126
  character strings (with quotes).