[R] select subset based on another variable
dwinsemius at comcast.net
Thu May 13 15:55:20 CEST 2010
On May 13, 2010, at 9:48 AM, Carrie Li wrote:
> Hi, dear R-helpers,
> I have a simple question regarding selecting subset of a variable
> based on
> another variable.
> Here is the example:
> id=sample(1:10, 10)
> temp=c(6, 1, 8, 2)
> Now, all I want is xx's that their id are 6, 1, 8, 2, instead of the
> Any suggestions ?
> Thank you all your help !!
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
West Hartford, CT
More information about the R-help