mean.circular: Mean Direction

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Returns the mean direction of a vector of circular data.

Usage

1
2
## S3 method for class 'circular'
mean(x, na.rm=FALSE, control.circular=list(), ...)

Arguments

x

a vector. The object is coerced to class circular.

na.rm

logical, indicating if NA's should be omitted.

control.circular

the attribute of the resulting object.

...

further arguments passed to or from other methods.

Details

Each observation is treated as a unit vector, or point on the unit circle. The resultant vector of the observations is found, and the direction of the resultant vector is returned. An NA is returned if the resultant length (see rho.circular) is less than .Machine

Value

Returns the mean direction of the data as an object of class circular with the attribute given by control.circular or from x if missed in control.circular.

Author(s)

Claudio Agostinelli and Ulric Lund

References

Jammalamadaka, S. Rao and SenGupta, A. (2001). Topics in Circular Statistics, Section 1.3, World Scientific Press, Singapore.

See Also

var.circular, summary.circular, mle.vonmises, rho.circular and .Machine.

Examples

1
2
3
# Compute the mean direction of a random sample of observations.
x <- circular(runif(50, circular(0), pi))
mean(x)

Example output

Attaching package: 'circular'

The following objects are masked from 'package:stats':

    sd, var

Circular Data: 
Type = angles 
Units = radians 
Template = none 
Modulo = asis 
Zero = 0 
Rotation = counter 
[1] 1.576529

circular documentation built on May 2, 2019, 4:42 p.m.