I am a new R user. Now I have some problem while I use R. I have set up a data frame called "mydata". One of the colume of it was "skill". Now I want to select the observations of the frame whose "skill" value is 1,by what command can I get it?
Suggestion of thread: "Selecting rows from dataframe" subset(mydata, mydata$skill==1") may works. Best wishes milton On Sun, Mar 29, 2009 at 10:27 PM, minben <minbenh@gmail.com> wrote:> I am a new R user. Now I have some problem while I use R. I have set > up a data frame called "mydata". One of the colume of it was "skill". > Now I want to select the observations of the frame whose "skill" value > is 1,by what command can I get it? > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
-----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of minben Sent: Monday, 30 March 2009 12:28 PM To: r-help at r-project.org Subject: [R] A simple problem> I am a new R user.Welcome. It would be polite to give us your name.> Now I have some problem while I use R. I have set > up a data frame called "mydata". One of the colume of it was "skill". > Now I want to select the observations of the frame whose "skill" value > is 1,by what command can I get it?subset(mydata, skil == 1) Bill Venables. ______________________________________________ R-help at r-project.org 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.