or
US Fish & Wildlife Service
California, USA
http://www.fws.gov/redbluff/rbdd_jsmp.aspx
>
>From: David L Carlson
>To: 'Felipe Carrillo' ; 'arun'
>
>Cc: 'R help'
>Sent: Sunday, December 2, 2012 2:54 PM
>Su
M
> To: arun
> Cc: R help
> Subject: Re: [R] simple subset question
>
> Actually, I dput(winter) and is not that big.so here is the whole
> thing I
> am trying to accomplish.
> winter <- structure(list(IDWeek = c(27L, 28L, 29L, 30L, 31L, 32L, 33L,
> 34L, 35L, 36L, 3
uot;)
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
http://www.fws.gov/redbluff/rbdd_jsmp.aspx
>
>From: arun
>To: Felipe Carrillo
>Cc: William Dunlap ; David Winsem
am Dunlap ; arun
Cc: R help
Sent: Sunday, December 2, 2012 2:34 PM
Subject: Re: [R] simple subset question
Using my whole dataset I get:
library(plyr)
ddply(winter,"Year",summarise,maxTotal=max(Total))
fish <- structure(list(Year = 2002:2012, maxTotal = c(1464311L, 107105
unday, December 2, 2012 1:25 PM
Subject: Re: [R] simple subset question
Sorry, I was trying it to subset from a bigger dataset called 'winter' and
forgot to change the variable names
when I asked the question. David W suggestion works but the strange part is
that I am still getting
alifornia, USA
http://www.fws.gov/redbluff/rbdd_jsmp.aspx
From: David Winsemius
>To: Felipe Carrillo
>Cc: William Dunlap ; arun ; R help
>
>Sent: Sunday, December 2, 2012 11:54 AM
>Subject: Re: [R] simple subset question
>
>The reason I suggested the alternative that I did was bec
e D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
http://www.fws.gov/redbluff/rbdd_jsmp.aspx
From: William Dunlap
To: Felipe Carrillo ; arun >
Cc: R help
Sent: Sunday, December 2, 2012 11:00 AM
Subject: RE: [R] simple sub
gt;Cc: R help
>Sent: Sunday, December 2, 2012 11:00 AM
>Subject: RE: [R] simple subset question
>
>> I am
>> still getting an error message
>> >with :
>> > x <- subset(fish,Year==2012 & Total==max(Total));x
>> >I get:
>> >[1] IDWeek
> Of Felipe Carrillo
> Sent: Sunday, December 02, 2012 10:47 AM
> To: arun
> Cc: R help
> Subject: Re: [R] simple subset question
>
> Works with the small dataset (2 years) but I get the error message with the
> whole
> dataset (12 years of data). I am going to have
> to
On Sun, Dec 2, 2012 at 6:46 PM, Felipe Carrillo
wrote:
> Works with the small dataset (2 years) but I get the error message with the
> whole dataset (12 years of data). I am going to have
> to check what's wrong with it...Thanks
Off the cuff guess: there's a NA in Total so max(Total) is NA which
USA
http://www.fws.gov/redbluff/rbdd_jsmp.aspx
From: arun
>To: Felipe Carrillo
>Cc: R help ; R. Michael Weylandt
>
>Sent: Sunday, December 2, 2012 10:29 AM
>Subject: Re: [R] simple subset question
>
>Hi,
>I am getting this:
>x<-subset(fish,Year==2012 & Tota
http://www.fws.gov/redbluff/rbdd_jsmp.aspx
From: R. Michael Weylandt
>To: Felipe Carrillo
>Cc: "r-help@r-project.org"
>Sent: Sunday, December 2, 2012 9:42 AM
>Subject: Re: [R] simple subset question
>
>On Sun, Dec 2, 2012 at 5:21 PM, Felipe Carrillo
> wrote:
>>
Hi, Felipe,
two typos? See below!
On Sun, 2 Dec 2012, Felipe Carrillo wrote:
Hi,
Consider the small dataset below, I want to subset by two variables in
one line but it wont work...it works though if I subset separately. I have
to be missing something obvious that I did not realize before whil
On Sun, Dec 2, 2012 at 5:21 PM, Felipe Carrillo
wrote:
> Hi,
> Consider the small dataset below, I want to subset by two variables in
> one line but it wont work...it works though if I subset separately. I have
> to be missing something obvious that I did not realize before while using
> subset.
On Dec 2, 2012, at 9:21 AM, Felipe Carrillo wrote:
Hi,
Consider the small dataset below, I want to subset by two variables in
one line but it wont work...it works though if I subset separately.
I have
to be missing something obvious that I did not realize before while
using subset..
fish
shouldn't you just change b to x and winter to fish? :)
On Sun, Dec 2, 2012 at 12:21 PM, Felipe Carrillo
wrote:
> Hi,
> Consider the small dataset below, I want to subset by two variables in
> one line but it wont work...it works though if I subset separately. I have
> to be missing something
Hi,
Consider the small dataset below, I want to subset by two variables in
one line but it wont work...it works though if I subset separately. I have
to be missing something obvious that I did not realize before while using
subset..
fish <- structure(list(IDWeek = c(27L, 28L, 29L, 30L, 31L, 32L,
17 matches
Mail list logo