note: whole function is below- I am sure I am doing something silly.
when I use it like USGS(input=precipitation) it is choking on the
precip.1 - subset(DF, precipitation!=NA)
b - ddply(precip.1$precipitation, .(precip.1$gauge_name), cumsum)
DF.precip - precip.1
DF.precip$precipitation -
I don't think you can do this
precipitation!=NA)
have a look at ?is.na
--- On Tue, 5/18/10, stephen sefick ssef...@gmail.com wrote:
From: stephen sefick ssef...@gmail.com
Subject: [R] Function that is giving me a headache- any help appreciated
(automatic read )
To: r-help@r-project.org
:
From: stephen sefickssef...@gmail.com
Subject: [R] Function that is giving me a headache- any help appreciated
(automatic read )
To: r-help@r-project.org
Received: Tuesday, May 18, 2010, 12:38 PM
note: whole function is below- I am
sure I am doing something silly.
when I use it like USGS(input
precip.1 - subset(DF, precipitation!=NA)
b - ddply(precip.1$precipitation, .(precip.1$gauge_name), cumsum)
DF.precip - precip.1
DF.precip$precipitation - b$.data
I suspect what you want here is
ddply(precip.1, gauge_name, transform, precipitation = cumsum(precipitation))
Hadley
--
4 matches
Mail list logo