[R] Learning R - View datasets
Paul Hiemstra
p.hiemstra at geo.uu.nl
Fri Nov 27 09:50:53 CET 2009
Brock Tibert wrote:
> Hi All,
>
> I am making a serious effort to try to learn R, but one hurdle I am facing is that I need to "see" the data as I walk through the examples in the packages. For instance, many examples on the web start by a command like data("wines"). How can I actually view what the dataset looks like prior to transformations and analysis? I have tried to use edit() , print, and head.
>
> In short, I know that data() lists all of the available datasets, data("wines") will load the dataset wines, but how can I look at the raw data?
>
> I figure this is probably an easy question, but any help you can provide will be greatly appreciated.
>
> Thanks,
>
> Brock
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
Hi Brock,
Take a look at the summary() function and the str() function. Also try
and type the name of the dataset or use plot() on it.
data(cars)
summary(cars)
str(cars)
cars
plot(cars)
Have you read the Introduction to R [1]?
cheers,
Paul
[1] http://cran.r-project.org/doc/manuals/R-intro.pdf
--
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone: +3130 274 3113 Mon-Tue
Phone: +3130 253 5773 Wed-Fri
http://intamap.geo.uu.nl/~paul
More information about the R-help
mailing list