Hi: I'm loading in students test scores with:> abntest <- read.table("scores.txt")if I type:>abntestI get ALL the values. I want to be able to filter it by various things such as: if( abntesr > 90) Print abntest; and other logical operators. I'm sure this is simple for someone experienced. Thanks, Gregg Allen
abntest[abntest$abntesr > 90,] On Sun, Jan 4, 2009 at 11:55 AM, <greggallen at gmail.com> wrote:> Hi: > > I'm loading in students test scores with: > >> abntest <- read.table("scores.txt") > > if I type: > >>abntest > > I get ALL the values. I want to be able to filter it by various things such as: > > > if( abntesr > 90) Print abntest; > > and other logical operators. I'm sure this is simple for someone experienced. > > > Thanks, > > Gregg Allen > > ______________________________________________ > 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. >
Hi, get yourself one of the many free manuals that you can download online. They answer the easier questions. Tom Short's R reference card may also be very helpful to have on the side when you are an R novice. Cheers, Daniel ------------------------- cuncta stricte discussurus ------------------------- -----Urspr?ngliche Nachricht----- Von: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Im Auftrag von greggallen at gmail.com Gesendet: Saturday, January 03, 2009 10:55 PM An: r-help at r-project.org Betreff: [R] Newbie question Hi: I'm loading in students test scores with:> abntest <- read.table("scores.txt")if I type:>abntestI get ALL the values. I want to be able to filter it by various things such as: if( abntesr > 90) Print abntest; and other logical operators. I'm sure this is simple for someone experienced. Thanks, Gregg Allen ______________________________________________ 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.
Also, subset( abntest, abntesr > 90 ) -Don At 8:55 PM -0700 1/3/09, greggallen at gmail.com wrote:>Hi: > >I'm loading in students test scores with: > >> abntest <- read.table("scores.txt") > >if I type: > >>abntest > >I get ALL the values. I want to be able to filter it by various >things such as: > > >if( abntesr > 90) Print abntest; > >and other logical operators. I'm sure this is simple for someone experienced. > > >Thanks, > >Gregg Allen > >______________________________________________ >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.-- --------------------------------- Don MacQueen Lawrence Livermore National Laboratory Livermore, CA, USA 925-423-1062 macq at llnl.gov