speed_to_knots {weathermetrics}R Documentation

Convert between standard units of measure for wind speed

Description

speed_to_knots creates a numeric vector of speed in knots from a numeric vector of speed in the specified unit.

Usage

speed_to_knots(x, unit, round = 1)

Arguments

x

Numeric vector of wind speeds, in units specified by unit

unit

Character specifying the speed unit other than knots. Possible values are:

  • mph: Miles per hour

  • mps: Meters per second

  • ftps: Feet per second

  • kmph: Kilometers per hour

round

An integer indicating the number of decimal places to round the converted value.

Value

A numeric vector of speeds (in knots)

Note

Equations are from the source code for the National Oceanic and and Atmospheric Administration's online wind speed converter

Author(s)

Joshua Ferreri joshua.m.ferreri@gmail.com, Brooke Anderson brooke.anderson@colostate.edu

References

http://www.srh.noaa.gov/epz/?n=wxcalc_windconvert

See Also

knots_to_speed

Examples

data(beijing)
beijing$knots <- speed_to_knots(beijing$kmph, unit = "kmph", round = 2)
beijing


[Package weathermetrics version 1.2.2 Index]