Reputation: 59
I got a very trivial but a very frustrating problem. The problem is, I want to load data from the packages I have already installed in R. This is what I am doing :
data()
to see what data sets are available.data(CO2)
in the console, nothing happens.Even co2 <- data(CO2)
doesn't seems to be working. I also tried loading datasets using library(datasets)
but nothing seems to be working. Please Help !
Upvotes: 0
Views: 2623
Reputation: 4414
data() loads the dataset into the global environment if not already loaded. Just type:
CO2
to access the dataset. For CO2, you do not even have to use data(CO2).
Upvotes: 1