Re: [R] Subset by using multiple values

From: Farrel Buchinsky <fjbuch_at_gmail.com>
Date: Mon 01 Jan 2007 - 01:36:00 GMT

I found a solution to my problem. I thought I would post it here. That will help me in 3 months when I have forgotten it or some other poor soul who stumbles across the same problem.

RawSeqBig<-RawSeqBig[RawSeqBig$ASSAY_ID %in% rejectrs$rs==FALSE,]

"Farrel Buchinsky" <fjbuch@gmail.com> wrote in message news:bd93cdad0612311716o19b74d15k7d6174ead6bf5403@mail.gmail.com...
>I have a vector containg about 20 unique values. It is called rejectrs$rs.
> It is a factor
> I have a data frame with about 100000 rows.
> I want to exclude all rows where in variable rs the value is one of the 20
> on the exclude list. I thought this would work but none did.
>
> RawSeqBig<-subset(RawSeqBig,ASSAY_ID!=rejectrs$rs)
>
> RawSeqBig<-subset(RawSeqBig,ASSAY_ID!=list(rejectrs$rs))
>
>
> --
> Farrel Buchinsky
> Mobile: (412) 779-1073
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon Jan 01 12:40:26 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 01 Jan 2007 - 02:30:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.