The data function is used both to load data sets from
packages, and give a display of the names and titles of data sets in one or
more packages, however it does not return a result that can be easily used
to get additional information about the nature of data sets in packages.
A data.frame whose rows correspond to data sets found in
package.
The columns (for a single package) are:
Item
data set name, a
character variable
class
class, the object class of the data set,
typically one of "data.frame", "table", "array" ...
dim
an abbreviation of the dimensions of the data set, in a form like
"36x3" for a data.frame or matrix with 36 rows and 3 columns.
Title
data set title
Arguments
package
a character vector giving the package(s) to look in
allClass
a logical variable. Include all classes of the item
(TRUE) or just the last class (FALSE)?
incPackage
include the package name in result?
maxTitle
maximum length of data set Title
Author
Michael Friendly, with R-help from Curt Seeliger
Details
The datasets() function is designed to produce a more useful summary
display of data sets in one or more packages. It extracts the class
and dimension information (dim or codelength) of each item, and
formats these to provide additional descriptors.
The requested packages must be installed, and are silently loaded in order
to extract class and size information.
datasets("vcdExtra")
# datasets(c("vcd", "vcdExtra"))datasets("datasets", maxTitle=50)
# just list dataset names in a packagedatasets("vcdExtra")[,"Item"]
datasets("vcd")[,"Item"]