wdws2uv | R Documentation |
this function converts wind direction and wind speed to u and v components
wdws2uv(wd, ws)
wd |
a vector of wind directions |
ws |
a vector of wind speeds |
a matrix
Tim Appelhans
uv2wdws
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])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.