> 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


-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

______________________________________________
R-help@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.

Reply via email to