Skip to content
Prev 312686 / 398506 Next

simple subset question

Hi,
I am getting this:
x<-subset(fish,Year==2012 & Total==max(Total))
?x
#?? IDWeek? Total?? Fry? Smolt? FryEq Year
#21???? 47 303259 34008 269248 491733 2012
A.K.




----- Original Message -----
From: Felipe Carrillo <mazatlanmexico at yahoo.com>
To: R. Michael Weylandt <michael.weylandt at gmail.com>
Cc: "r-help at r-project.org" <r-help at r-project.org>
Sent: Sunday, 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 an error message
with :
? x <- subset(fish,Year==2012 & Total==max(Total));x
I get:
[1] IDWeek Total? Fry??? Smolt? FryEq? Year? 
<0 rows> (or 0-length row.names)
?
I will start a fresh session to see if that helps...Thank you all

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: R. Michael Weylandt <michael.weylandt at gmail.com>
??? [[alternative HTML version deleted]]


______________________________________________
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.