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

Description Usage Arguments Value Author(s) See Also Examples

View source: R/uv2wdws.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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 Sept. 23, 2018, 5:17 a.m.