[R] Learning R - View datasets

Gabor Grothendieck ggrothendieck at gmail.com
Fri Nov 27 12:23:22 CET 2009


Try this:

# each of these three show entire data set
wines
dput(wines)
View(wines)

# get help
?wines

# various info on data set
head(wines)
tail(wines)
summary(wines)
str(wines)
class(wines)
dim(wines)

# plotting
plot(wines)
# for a better plot see the example at the bottom of ?wines

On Thu, Nov 26, 2009 at 11:46 PM, Brock Tibert <btibert3 at yahoo.com> 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.
>




More information about the R-help mailing list