[R] Proper use of grep

Doran, Harold HDoran at air.org
Thu Jul 15 23:41:06 CEST 2010


Excellent idea

-----Original Message-----
From: Erik Iverson [mailto:eriki at ccbr.umn.edu] 
Sent: Thursday, July 15, 2010 5:40 PM
To: Doran, Harold
Cc: r-help at r-project.org
Subject: Re: [R] Proper use of grep



Doran, Harold wrote:
> Thanks. Yes, I did that on a toy data set and with my real data. It
> *seems* to have worked. I just work with grep so rarely that I didn't
> want to miss something.

Yes, I see no reason why it won't work.  You can do another check 
'manually'. You know how many of each you expect by

 >table(all$Classical.Statistic)

So you can add up the ones that you care about, and then make sure that 
your resulting subset using grep has that many rows...



More information about the R-help mailing list