Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

datasets

Information on Data Sets in Packages


Description

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.

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.

Usage

datasets(package, allClass=FALSE, 
    incPackage=length(package) > 1,
    maxTitle=NULL)

Arguments

package

a character vector giving the package(s) to look in

allClass

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

Details

The requested packages must be installed, and are silently loaded in order to extract class and size information.

Value

A data.frame whose rows correspond to data sets found in package. The columns (for a single package) are:

Item

data set name

class

class

dim

an abbreviation of the dimensions of the data set

Title

data set title

Author(s)

Michael Friendly, with R-help from Curt Seeliger

See Also

Examples

datasets("vcdExtra")
datasets(c("vcd", "vcdExtra"))
datasets("datasets", maxTitle=50)

vcdExtra

'vcd' Extensions and Additions

v0.7-5
GPL (>= 2)
Authors
Michael Friendly [aut, cre], Heather Turner [ctb], Achim Zeileis [ctb], Duncan Murdoch [ctb], David Firth [ctb]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.