Re: [R] simple if question

2011-03-26 Thread Thomas Levine
Posting some sample data would help, but I think something like this is what you want data[data$school=='Cornell University',] For example CO2[CO2$Type=='Quebec',] Tom 2011/3/26 Sebastián Daza : > Hi everyone, > I have just got different samples from a dataframe (independent and > exclusive, t

Re: [R] simple if question

2011-03-26 Thread David Winsemius
On Mar 26, 2011, at 7:05 PM, Sebastián Daza wrote: Hi everyone, I have just got different samples from a dataframe (independent and exclusive, there aren't common elements among them). I want to create a variable that indicate the sampling selection of the elements in the original datafra

[R] simple if question

2011-03-26 Thread Sebastián Daza
Hi everyone, I have just got different samples from a dataframe (independent and exclusive, there aren't common elements among them). I want to create a variable that indicate the sampling selection of the elements in the original dataframe (for example, 0 = no selected, 1= sample 1, 2=sample