mean_wd: Function to calculate mean wind direction.

View source: R/mean_wd.R

mean_wdR Documentation

Function to calculate mean wind direction.

Description

Function to calculate mean wind direction.

Usage

mean_wd(wd, ws, na.rm = FALSE)

Arguments

wd

Numeric vector representing wind direction in degrees.

ws

Numeric vector representing wind speed. If ws is supplied, average wind directions will be weighted by wind speed and therefore will be the "resultant vector average wind speed". This is usually considered the most appropriate aggregation for wind direction.

na.rm

Should NAs be omitted from the calculation?

Value

Numeric vector with length of 1.

Author(s)

Stuart K. Grange


skgrange/threadr documentation built on May 11, 2024, 12:16 p.m.