Yes, many common datasets are stored in base R, like IRIS and CARS. I would look up in the R website which ones are available because they might change. Also they are not stored in the working directory but somewhere in R.
One of the big differences between R and classic packages like SAS and SPSS is that the data structure for the data frame is not a free-standing file. Instead one or more R objects gets saved to an .RData file. Think of the .RData file as a special folder for R objects. I often name it by the date e.g. July17.RData, so I can go back and retrieve my work. By default you have the option to save all your data frames, vectors and lists to the .RData file in the working directory upon exit. But if you wish to read in a file and save it, use the save function and specify the name. Then the next time you need a file, load that .RData file.
Someone I worked with saved all his data as functions. The function would read in each raw file and was saved as code. This was a little strange to me but had the advantage that he only had to deal with the default .Rdata file.
I don't want to be responsible for writing R code so the best thing to do is to get a book that focuses on R for your particular need. Also Stackoverflow.com is a good place for specific queries. Type '[R]
keyword' where keyword is the name of a function or a phrase. Also
www.statmethods.net is a good general resource.
R is a confusing and the documentation is not for beginners. So have patience and it will become fun.
Kind regards,
Georgette Asherman
------Original Message------
The iris data already exists in the base R installation as data frames. At the command prompt, type:
iris
or
View(iris)
to view the data. The 2nd way presents info in a spreadsheet-style format.
To view all the data sets that are part of the datasets package, you can use
data()
If you need to pull in data outside R, what is the most common format that you are opening? Excel, comma or tab separated data, etc?
------------------------------
Mark Lancaster
Northern Kentucky University
------------------------------
Original Message:
Sent: 08-30-2015 08:06
From: J. Dobbins
Subject: Downloading R data sets to an R workplace
I think I said that right: "Downloading R data sets to an R workplace". I am wanting to work with standard datasets such as "Iris" dataset, etc.
How do you down load them so that they are objects in R?
Thanks,
Greg