Message-ID: <8A6262ED-D63B-46E8-864E-0EA86BD017D4@comcast.net>
Date: 2011-05-25T14:48:09Z
From: David Winsemius
Subject: select levels of factor variables
In-Reply-To: <1306313163835-3549189.post@n4.nabble.com>
On May 25, 2011, at 4:46 AM, zoe.cryocla wrote:
> Hi again,
> I've got another question...
>
>
> I often use the symbol == to select some levels of factor variables
> like :
> data[data$var=="blabla", [
>
> But this time, I'd like to select all the levels of my variable wich
> contain
> the letter "B", is that a way to determine this conditions ?
Perhaps with grep and/or %in%
Got a reproducible example? ...preferably constructed with dput
--
David Winsemius, MD
West Hartford, CT