On Mon, 1 Mar 2010 11:02:59 +0100 Karl Ove Hufthammer <k...@huftis.org> wrote: > > * What were your biggest misconceptions or > > stumbling blocks to getting up and running > > with R? > > Also I found it quite confusing that
One more thing that still trips me up sometimes. '$' works on data frames but not on matrices (with dimnames/colnames). Even though the two objects *look* exactly the same, '$' on one of them works while '$' on the other gives a *very* confusing error message. Example: d=head(iris[1:4]) d2=as.matrix(d) d d2 d$Sepal.Width d2$Sepal.Width Some functions output matrices where you would expect them to output data frames, and then this problem occurs. (Is there a reason why '$' could/should not be made to 'work' on matrices too?) -- Karl Ove Hufthammer ______________________________________________ R-help@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.