Learn R Programming

circhelp (version 1.1)

circ_mean_rad: Circular mean

Description

Circular mean

Usage

circ_mean_rad(x, na.rm = FALSE)

circ_mean_180(x, na.rm = FALSE)

circ_mean_360(x, na.rm = FALSE)

Value

mean of values in the vector

Arguments

x

vector of values

na.rm

a logical value indicating whether NA values should be removed before the computation proceeds

Functions

  • circ_mean_rad(): circular mean in 2pi space

  • circ_mean_180(): circular mean in 180° space (e.g., line orientation)

  • circ_mean_360(): circular mean in 360° space

Examples

Run this code
x <- runif(1000, -pi, pi)
mean(x)
circ_mean_rad(x)

Run the code above in your browser using DataLab