Re: [R] subset() multiple arguments

2008-07-07 Thread Peter Dalgaard
stephen sefick wrote: This is what I would like to do and it works just fine. Is there a way to shorten this code so I don't have to subset a subset of a subset? d<-subset(subset(subset(subset(x, River.Mile<=202), River.Mile>3), Lagrangian=="Yes"), EventType=="Regular") Stephen "&" is your

Re: [R] subset() multiple arguments

2008-07-07 Thread Duncan Murdoch
On 7/7/2008 3:19 PM, stephen sefick wrote: This is what I would like to do and it works just fine. Is there a way to shorten this code so I don't have to subset a subset of a subset? d<-subset(subset(subset(subset(x, River.Mile<=202), River.Mile>3), Lagrangian=="Yes"), EventType=="Regular")

Re: [R] subset() multiple arguments

2008-07-07 Thread Henrique Dallazuanna
Try this: d<- subset(x, River.Mile <= 202 & River.Mile > 3 & Langrangian == "Yes" & EventType == "Regular") On Mon, Jul 7, 2008 at 4:19 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > This is what I would like to do and it works just fine. Is there a way to > shorten this code so

[R] subset() multiple arguments

2008-07-07 Thread stephen sefick
This is what I would like to do and it works just fine. Is there a way to shorten this code so I don't have to subset a subset of a subset? d<-subset(subset(subset(subset(x, River.Mile<=202), River.Mile>3), Lagrangian=="Yes"), EventType=="Regular") Stephen -- Let's not spend our time and resour