Re: [R] Subset in, not in

2013-01-10 Thread David Winsemius
On Jan 10, 2013, at 12:04 PM, Patrick Burns wrote: Did you try: mm <- subset(agr1, subset= !(lmpcrd %in% c(11697,149823,7654))) And it might be noted that this is part of the last example on the help page: ?'%in%' -- David. (Actually the parentheses that I added are not necessary, bu

Re: [R] Subset in, not in

2013-01-10 Thread Patrick Burns
Did you try: mm <- subset(agr1, subset= !(lmpcrd %in% c(11697,149823,7654))) (Actually the parentheses that I added are not necessary, but they make me feel better.) Pat On 10/01/2013 19:54, ramoss wrote: Hello, I need to subset my dataframe into 2 parts; in: mm <- subset(agr1, subset=lmp

[R] Subset in, not in

2013-01-10 Thread ramoss
Hello, I need to subset my dataframe into 2 parts; in: mm <- subset(agr1, subset=lmpcrd %in% c(11697,149823,7654)) not in: but where do I stick the " !" in the above? I've tried every position. Thanks for your help. -- View this message in context: http://r.789695.n4.nabble.com/Subs