[R] dropping rows

Douglas Bates bates at stat.wisc.edu
Thu Dec 2 02:03:21 CET 2004


Tobias Muhlhofer wrote:
> Thanks.
> 
> The problem is that there is extremely little on dataframes or matrices 
> in "An Intro to R", which I did read and I frankly don't know where else 
> to go.
> 
> Once I know a function like subset() exists, I can then read the help 
> files on it and that's fine, but I would never dream this function up 
> myself...
> 
> As for indexing, I DID read "An Introduction to R" and I did NOT catch 
> the part where it says you can use any variable in the dataframe to 
> index it, nor would I have thought of it by myself. From that 
> documentation, I only learned about using row-labels to index things...
> 
> But I am definitely thankful for the quick help given to me by people on 
> this list, and so I guess being RTFM'ed is a small price to pay for 
> figuring out how to solve the problem I need to solve.

Being RTFM'ed is even more valuable when the answer given is wrong (as 
mine was) but the manual page is right.  I showed you how to select the 
rows where year < 1960 rather than how to drop those rows.  :-)




More information about the R-help mailing list