It looks like I should read the documentation a bit more carefully.
Simply ignoring the NA values when calculating the mean *is* a much
better solution. (Although having 10 values out of a vector of 4
or so set to zero is *not* going to bias the mean toward zero in any
significant way.)
Thanks
(x_ema)), 0)
> which (is.na(x_ema))
integer(0)
The mean() call works now and I can get on with my work. I'll have to
remember to condition the data like this in the future.
Thanks for the help!
Reuben Bellika
__
R-help@r-project.org mailing list
h
to what might be wrong.
Thank you,
Reuben Bellika
__
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.
3 matches
Mail list logo