On Mon, 2007-03-26 at 17:02 +0200, Sergio Della Franca wrote: > Dear R-Helpers, > > I want to make a subset from my data set. > > I'd like to perform different condition for subset. > > I.e.: > > I like to create a subset when: > - var1=0 > - var2=0 > - var3 is different from 2. > > How can i develop a subset under this condition? > > Thank you in advance. > > Sergio Della Franca.
See ?subset Something along the lines of the following should work: NewDF <- subset(DF, (var1 == 0) & (var2 == 0) & (var 3 != 0)) HTH, Marc Schwartz ______________________________________________ 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.