Hi R experts,
How can I get a ts object from a data frame object which contains a daily
time series in order to apply it time series functions?
Tanks
Aleto
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat
Hi R experts,
I need know how calculate a weighted mean by group in a data frame. I have
tried with aggragate() function:
data.frame(x=c(15,12,3,10,10),g=c(1,1,1,2,2,3,3),w=c(2,3,1,5,5,2,5)) -> d
aggregate(d$x,by=list(d$g),weighted.mean,w=d$w)
Generating the following error:
Error en FUN(X[[1L]
2 matches
Mail list logo