>From a dataset , I want select age >=36 and income>10000. How to do ?parth
Hi Parth, Assume that your dataset is in the form of a data frame, named psdf. psdf<-data.frame(age=sample(0:100,50),income=sample(8000:12000,50)) selectdf<-subset(psdf,age >= 36 & income > 10000) Jim On Mon, Feb 16, 2015 at 7:01 PM, Partha Sinha <pnsinha68 at gmail.com> wrote:> >From a dataset , I want select age >=36 and income>10000. How to do ? > parth > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
? subset. You have most of the command already written John Kane Kingston ON Canada> -----Original Message----- > From: pnsinha68 at gmail.com > Sent: Mon, 16 Feb 2015 13:31:33 +0530 > To: r-help at r-project.org > Subject: [R] Selection/filtering from Data > > >From a dataset , I want select age >=36 and income>10000. How to do ? > parth > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account.