uv2wdws: convert u and v components to wind direction and wind speed

View source: R/uv2wdws.R

uv2wdwsR Documentation

convert u and v components to wind direction and wind speed

Description

this function converts u and v components to wind direction and wind speed

Usage

uv2wdws(u, v)

Arguments

u

a vector of u components

v

a vector of v components

Value

a matrix

Author(s)

Tim Appelhans

See Also

wdws2uv

Examples

set.seed(123)
wd <- as.integer(rnorm(10, 180, 90))

set.seed(123)
ws <- rnorm(10, 4, 1)

## convert to u and v
wdws2uv(wd, ws)

## convert back
uv <- wdws2uv(wd, ws)
uv2wdws(uv[, 1], uv[, 2]) 


environmentalinformatics-marburg/Rsenal documentation built on July 28, 2023, 6:09 a.m.