i% letters[3:5]
[1] TRUE TRUE FALSE
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of
Emily Deomano [edeom...@bses.com.au]
Sent: 07 October 2010 09:17
To: r-help@r-project.org
Subject: [R] what is the "NOT IN" operator
Good day,
I ne
] %ni% letters[3:5]
[1] TRUE TRUE FALSE
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of
Emily Deomano [edeom...@bses.com.au]
Sent: 07 October 2010 09:17
To: r-help@r-project.org
Subject: [R] what is the "NOT IN" o
g] On Behalf Of
Emily Deomano [edeom...@bses.com.au]
Sent: 07 October 2010 09:17
To: r-help@r-project.org
Subject: [R] what is the "NOT IN" operator
Good day,
I need to subset a data by removing several rows. I know the %in% operator,
i.e.
sub <- mydata[group %in% c("A"
On Oct 6, 2010, at 9:03 PM, Christian Raschke wrote:
Put the "!" in front of the whole expression, not just the %in%
function. I.e.
sub <- mydata[!(mydata$group %in% c("A", "B", "E", "G")),]
You can also look at the match help page where %in% and its negation,
%w/o% , are illustrated.
--
Put the "!" in front of the whole expression, not just the %in%
function. I.e.
sub <- mydata[!(mydata$group %in% c("A", "B", "E", "G")),]
Christian
On Thu, 2010-10-07 at 09:17 +1000, Emily Deomano wrote:
> Good day,
> I need to subset a data by removing several rows. I know the %in% operator,
Good day,
I need to subset a data by removing several rows. I know the %in% operator,
i.e.
sub <- mydata[group %in% c("A","B","E","G"), ]
What I need is the opposite, that is remove rows and/or columns. What is the
operator for "NOT IN"? I tried (i)! %in% and (ii) ^%in% and both resulted in
6 matches
Mail list logo