[R] Weighted circular mean
Uwe Ligges
ligges at statistik.uni-dortmund.de
Thu Aug 21 08:45:51 CEST 2003
Martin Biuw wrote:
> Hello,
> Once again, I posted a message without a subject line. Sorry.... here is
> the question again.
>
> Is there a simple way to modify the circ.mean function in the CircStats
> package to include a vector of weights to obtain a weighted average angle?
Two comments:
1)
> circ.mean
function (x)
{
sinr <- sum(sin(x))
cosr <- sum(cos(x))
circmean <- atan(sinr, cosr)
circmean
}
The function is not that hard to understand, so you might be able to
answer your question yourself, don't you?
2)
Please contact the author of a contributed package in order to submit a
wishlist. He/she knows the functions much better and is the only one who
can change things within the package, regularly.
Uwe Ligges
More information about the R-help
mailing list