[R] How to filter a data frame?
John Kane
jrkrideau at yahoo.ca
Tue Jul 22 16:21:31 CEST 2008
Ooops ! Thanks.
--- On Tue, 7/22/08, Peter Dalgaard <p.dalgaard at biostat.ku.dk> wrote:
> From: Peter Dalgaard <p.dalgaard at biostat.ku.dk>
> Subject: Re: [R] How to filter a data frame?
> To: jrkrideau at yahoo.ca
> Cc: r-help at r-project.org, "rlearner309" <unixunix99 at gmail.com>
> Received: Tuesday, July 22, 2008, 10:19 AM
> John Kane wrote:
> > ?subset
> >
> > Is this what you want?
> >
> > subset(dataset, gender="M" | age < 50)
> >
> >
> In case you didn't see it: Make that
>
> gender == "M" | age < 50
>
> --
> O__ ---- Peter Dalgaard Øster Farimagsgade
> 5, Entr.B
> c/ /'_ --- Dept. of Biostatistics PO Box 2099,
> 1014 Cph. K
> (*) \(*) -- University of Copenhagen Denmark
> Ph: (+45) 35327918
> ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX:
> (+45) 35327907
__________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at
http://ca.toolbar.yahoo.com.
More information about the R-help
mailing list