June 2007
Beginner to intermediate
950 pages
27h 8m
English
There are many built-in data sets within the base package of R. You can see their names by typing
data()
You can read the documentation for a particular data set with the usual query:
?lynx
Many of the contributed packages contain data sets, and you can view their names using the try function. This evaluates an expression and traps any errors that occur during the evaluation. The try function establishes a handler for errors that uses the default error handling protocol:
try(data(package="spatstat"));Sys.sleep(3) try(data(package="spdep"));Sys.sleep(3) try(data(package="MASS"))
Built-in data files can be attached in the normal way; then the variables within them accessed by their names:
attach(OrchardSprays) decrease
Read now
Unlock full access