Skip to content
Prev 32675 / 398526 Next

Comparison Operator

OK, regexpr gets me what I needed, thanks to all..

One more thing, say I have a Table like:

0 RAW1 RAW2 RAW3 AVE1 AVE2 AVE3
1   1   2    5    2.3  1.2  4.5
2   0   3    6    1.7  2.2  3.5
3   3   1    6    0.1  3.9  1.6


and I want to create a sub table that only has the RAW columns.
Problem is I won't know what the column names will be, only that
they either contain "RAW" or "AVE" and they may not be grouped
together.

Mike


-----Original Message-----
From: Don MacQueen [mailto:macq at llnl.gov]
Sent: Friday, May 30, 2003 8:48 AM
To: Dirk Eddelbuettel; mhoward
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] Comparison Operator


grep() by itself isn't quite right for this job:
Error in if (grep(b, a)) c <- TRUE : argument is of length zero

-Don
At 6:24 PM -0500 5/29/03, Dirk Eddelbuettel wrote: