Skip to content
Prev 273337 / 398506 Next

How to subset() from data frame using specific rows

On Tue, 4 Oct 2011, R. Michael Weylandt wrote:

            
Michael,

   Apparently grep works differently in R than it does on the command line:

bf <- grep(ff, "BC-")
Warning message:
In grep(ff, "BC-") :
   argument 'pattern' has length > 1 and only the first element will be used

   I understand what you suggest but it does not appear to work for me.

Thanks,

Rich