Once You start your R program, there is example data sets available within R along with loaded packages. You can list the data sets by their names and then load a data set into memory to being used in your statistical analysis. For example, the ' modern applied Statistics with S "a data set called
Phonesis used in Chapter 6 for robust regression and we want to use the same data set for our own examples. Here's how to locate the data set and load it into R Command
LibraryLoads the package MASS (for modern applied Statistics with S) into memory. Command
data ()Would list all the datasets in loaded packages. The command
data (phones)Would load the data set
Phonesinto memory.
Library (MASS) data ()
Data sets in package ' Datasets ': airpassengers Monthly Airline passenger Numbers 1949-1960 bjsales Sales data with leading Indicator bjsales.lead (bjsales) sales data with leading Indicator BO D Biochemical Oxygen Demand CO2 Carbon dioxide uptake in grass plants chickweight Weight versus age of chicks on different diets DNase Elisa assay of DNase eustockmarkets Daily Closing prices of Major European Stock Indices, 1991-1998 .....
(more data sets in between is omitted.) Uspop populations Recorded by the US census volcano topographic information on Auckland ' s Maunga whau Volcano warpbreaks The number of Breaks in Yarn during Weaving women Average Heights and Weights for American women Data sets in package ' MASS ': Aids2 Austra LiAn AIDS survival Data Animals Brain and Body Weights for species ... (More data sets is omitted here) oats data from an oats Field Trial painters the Painte
R's data of de piles petrol N. L. Prater ' s petrol refinery Dataphones Belgium Phone Calls 1950-1973Quine absenteeism from School on Rural New South Wales ...
(More data sets is omitted here) Use ' data ' (package =. Packages (all.available = TRUE) "To list the data sets in all *available* packages.data (phones) phones$year [1] A-si-si-si-si-si-si-si-si-si-si .6 7.3 8.1 8.8 10.6 12.0 13.5 14.9 [13] 16.1 21.2 119.0 124.0 142.0 159.0 182.0 212.0 43.0 24.0 27.0 29.0