Skip to content

subset dataframe by rows using character vector?

1 message · Baptiste Auguie

#
glad it was helpful.

%in% is a logical operator, so you can use "!" to negate the result  
(with parentheses),

! ( 4 %in% 1:3)

Alternatively, define a new operator,

`%ni%` <- Negate(`%in%`)

1 %ni% c(2,1)

Next time you ask a follow-up question please send it to the r-help  
list so others can help you too.

HTH,

baptiste
On 14 Apr 2009, at 16:03, zack holden wrote:

            
_____________________________

Baptiste Augui?

School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

http://newton.ex.ac.uk/research/emag