DATA OBJECTS IN R
R Installation and Administration: Hints for installing R on special plat- forms.
Writing R Extensions: The authoritative source on how to write R pro- grams and packages.
Both printed and online publications are available, the most important ones are ‘Modern Applied Statistics with S’ (Venables and Ripley, 2002), ‘Intro- ductory Statistics with R’ (Dalgaard, 2002), ‘R Graphics’ (Murrell, 2005) and the R Newsletter, freely available from
In case the electronically available documentation and the answers to fre- quently asked questions (FAQ), available from
have been consulted but a problem or question remains unsolved, the r-help email list is the right place to get answers to well-thought-out questions. It is helpful to read the posting guide
http://www.R-project.org/posting-guide.html before starting to ask.
1.4 Data Objects in R
The data handling and manipulation techniques explained in this chapter will be illustrated by means of a data set of 2000 world leading companies, the Forbes 2000 list for the year 2004 collected by ‘Forbes Magazine’. This list is originally available from
and, as an R data object, it is part of the HSAUR package (Source: From Forbes.com, New York, New York, 2004. With permission.). In a first step, we make the data available for computations within R. The data function searches for data objects of the specified name ("Forbes2000") in the package specified via the package argument and, if the search was successful, attaches the data object to the global environment:
R> data("Forbes2000", package = "HSAUR") R> ls()
 "Forbes2000" "a"
The output of the ls function lists the names of all objects currently stored in the global environment, and, as the result of the previous command, a variable named Forbes2000 is available for further manipulation. The variable x arises from the pocket calculator example in Subsection 1.2.1.