Hello all,

followup to yesterday's question: Part of my confusion was caused by
my embarrassing mistake of overwriting the "ppk" function with another
object, which of course broke the next iteration of the loop.

Secondly, I got exactly what I wanted like this:

aggregate.zoo <- function(series) {
    agg <- aggregate(data=series, value ~ month, ppk, lsl=1300, usl=1500)
    return (zoo(x=agg$value, order.by=agg$month))
}
l1 = split(df, df$tool)
l2 = lapply(l1, aggregate.zoo)
l3 = do.call(merge, l2)

I puzzled this together from various example with only 80%
understanding how it works and why.

Regards,
robert

______________________________________________
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