Type: | Package |
Title: | Functions to Convert Between Weather Metrics |
Version: | 1.2.2 |
Date: | 2016-05-19 |
Description: | Functions to convert between weather metrics, including conversions for metrics of temperature, air moisture, wind speed, and precipitation. This package also includes functions to calculate the heat index from air temperature and air moisture. |
URL: | https://github.com/geanders/weathermetrics/ |
BugReports: | https://github.com/geanders/weathermetrics/issues |
License: | GPL-2 |
LazyData: | true |
RoxygenNote: | 5.0.1 |
Depends: | R (≥ 2.10) |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2016-05-19 18:53:55 UTC; brookeanderson |
Author: | Brooke Anderson [aut, cre], Roger Peng [aut], Joshua Ferreri [aut] |
Maintainer: | Brooke Anderson <brooke.anderson@colostate.edu> |
Repository: | CRAN |
Date/Publication: | 2016-05-19 23:19:30 |
weathermetrics: Functions to convert between weather metrics
Description
The weathermetics package provides functions to convert between Celsius and Fahrenheit, to convert between dew point temperature and relative humidity, and to calculate heat index.
weathermetrics functions
This package includes the following functions to calculate vectors of
weather metrics: celsius.to.fahrenheit
,
fahrenheit.to.celsius
,
dewpoint.to.humidity
,
humidity.to.dewpoint
, and
heat.index
.
Author(s)
Brooke Anderson brooke.anderson@colostate.edu, Joshua Ferreri joshua.m.ferreri@gmail.com, Roger Peng rdpeng@gmail.com
References
Anderson GB, Bell ML, Peng RD. 2013. Methods to calculate the heat index as an exposure Metric in environmental health research. Environmental Health Perspectives 121(10):1111-1119.
National Weather Service Hydrometeorological Prediction Center Web Team. Heat Index Calculator. 30 Jan 2015. http://www.wpc.ncep.noaa.gov/html/heatindex.shtml. Accessed 18 Dec 2015.
Weather in Los Angeles, CA
Description
Daily values of mean temperature (Kelvin) and mean dew point temperature (Kelvin) for the week of December 19, 2010, in Los Angeles, CA.
Usage
angeles
Format
A data frame 7 rows and 3 variables:
- date
Date of weather observation
- TemperatureK
Daily mean temperature in Kelvin
- DewpointK
Daily mean dewpoint temperature in Kelvin
Source
Weather in Beijing, China
Description
A dataset containing daily values of mean temperature (Fahrenheit) and mean wind speed (in miles per hour, meters per second, feet per seconds, and kilometers per hour) for the week of January 10, 2015, in Beijing, China.
Usage
beijing
Format
A data frame with 7 rows and 3 variables:
- date
Date of weather observation
- TemperatureF
Daily mean temperature in Fahrenheit
- MPH
Daily mean wind speed in miles per hour
- mps
Daily mean wind speed in meters per second
- ftps
Daily mean wind speed in feet per second
- kmph
Daily mean wind speed in kilometers per hour
Source
Precipitation in Breckenridge, CO
Description
Daily values of precipitation (inches) for the week of June 28, 2015, in Breckenridge, CO.
Usage
breck
Format
A data frame 7 rows and 2 variables:
- date
Date of weather observation
- Precip.in
Daily precipitation in inches
Source
Convert from Celsius to Fahrenheit.
Description
celsius.to.fahrenheit
creates a numeric vector of temperatures in
Fahrenheit from a numeric vector of temperatures in Celsius.
Usage
celsius.to.fahrenheit(T.celsius, round = 2)
Arguments
T.celsius |
Numeric vector of temperatures in Celsius. |
round |
An integer indicating the number of decimal places to round the converted value. |
Value
A numeric vector of temperature values in Fahrenheit.
Note
Equations are from the source code for the US National Weather Service's online heat index calculator.
Author(s)
Brooke Anderson brooke.anderson@colostate.edu, Roger Peng rdpeng@gmail.com
See Also
Examples
# Convert from Celsius to Fahrenheit.
data(lyon)
lyon$TemperatureF <- celsius.to.fahrenheit(lyon$TemperatureC)
lyon
Convert from Celsius to Kelvin.
Description
celsius.to.kelvin
creates a numeric vector of temperatures in
Kelvin from a numeric vector of temperatures in Celsius.
Usage
celsius.to.kelvin(T.celsius, round = 2)
Arguments
T.celsius |
Numeric vector of temperatures in Celsius. |
round |
An integer indicating the number of decimal places to round the converted value. |
Value
A numeric vector of temperature values in Kelvin.
Note
Equations are from the source code for the National Oceanic and Atmospheric Association's online temperature converter.
Author(s)
Joshua Ferreri joshua.m.ferreri@gmail.com, Brooke Anderson brooke.anderson@colostate.edu
See Also
Examples
# Convert from Celsius to Kelvin.
data(lyon)
lyon$TemperatureK <- celsius.to.kelvin(lyon$TemperatureC)
lyon
Convert between precipitation metrics
Description
This function allows you to convert among the following precipitation metrics: inches, millimeters, and centimeters.
Usage
convert_precip(precip, old_metric, new_metric, round = 2)
Arguments
precip |
A numerical vector of precipitation to be converted. |
old_metric |
The metric from which you want to convert. Possible options are:
|
new_metric |
The metric to which you want to convert. The same options
are possible as for |
round |
An integer indicating the number of decimal places to round the converted value. |
Value
A numeric vector with precipitation converted to the metric specified
by the argument new_metric
.
Author(s)
Joshua Ferreri joshua.m.ferreri@gmail.com, Brooke Anderson brooke.anderson@colostate.edu
Examples
data(breck)
breck$Precip.mm <- convert_precip(breck$Precip.in,
old_metric = "inches", new_metric = "mm", round = 2)
breck
data(loveland)
loveland$Precip.in <- convert_precip(loveland$Precip.mm,
old_metric = "mm", new_metric = "inches", round = NULL)
loveland$Precip.cm <- convert_precip(loveland$Precip.mm,
old_metric = "mm", new_metric = "cm", round = 3)
loveland
Convert from one temperature metric to another
Description
This function allows you to convert a vector of temperature values between Fahrenheit, Celsius, and degrees Kelvin.
Usage
convert_temperature(temperature, old_metric, new_metric, round = 2)
Arguments
temperature |
A numeric vector of temperatures to be converted. |
old_metric |
The metric from which you want to convert. Possible options are:
|
new_metric |
The metric to which you want to convert. The same options
are possible as for |
round |
An integer indicating the number of decimal places to round the converted value. |
Value
A numeric vector with temperature converted to the metric specified
by the argument new_metric
.
Author(s)
#' Joshua Ferreri joshua.m.ferreri@gmail.com, Brooke Anderson brooke.anderson@colostate.edu
Examples
data(lyon)
lyon$TemperatureF <- convert_temperature(lyon$TemperatureC,
old_metric = "c", new_metric = "f")
lyon
data(norfolk)
norfolk$TempC <- convert_temperature(norfolk$TemperatureF,
old_metric = "f", new_metric = "c")
norfolk
data(angeles)
angeles$TemperatureC <- convert_temperature(angeles$TemperatureK,
old_metric = "kelvin", new_metric = "celsius")
angeles
Convert between wind speed metrics
Description
This function allows you to convert among the following wind speed metrics: knots, miles per hour, meters per second, feet per second, and kilometers per hour.
Usage
convert_wind_speed(wind_speed, old_metric, new_metric, round = 1)
Arguments
wind_speed |
A numerical vector of wind speeds to be converted. |
old_metric |
The metric from which you want to convert. Possible options are:
|
new_metric |
The metric to which you want to convert. The same options
are possible as for |
round |
An integer indicating the number of decimal places to round the converted value. |
Value
A numeric vector with wind speed converted to the metric specified
by the argument new_metric
.
Author(s)
Joshua Ferreri joshua.m.ferreri@gmail.com, Brooke Anderson brooke.anderson@colostate.edu
Examples
data(beijing)
beijing$knots <- convert_wind_speed(beijing$kmph,
old_metric = "kmph", new_metric = "knots")
beijing
data(foco)
foco$mph <- convert_wind_speed(foco$knots, old_metric = "knots",
new_metric = "mph", round = 0)
foco$mph <- convert_wind_speed(foco$knots, old_metric = "knots",
new_metric = "mps", round = NULL)
foco$kmph <- convert_wind_speed(foco$mph, old_metric = "mph",
new_metric = "kmph")
foco
Calculate relative humidity.
Description
dewpoint.to.humidity
creates a numeric vector of relative humidity
from numerical vectors of air temperature and dew point temperature.
Usage
dewpoint.to.humidity(dp = NA, t = NA, temperature.metric = "fahrenheit")
Arguments
dp |
Numeric vector of dew point temperatures. |
t |
Numeric vector of air temperatures. |
temperature.metric |
Character string indicating the temperature
metric of air temperature and dew point temperature. Possible values
are |
Details
Dew point temperature and temperature must be in the same
metric (i.e., either both in Celsius or both in Fahrenheit). If
necessary, use convert_temperature
to convert before
using this function.
Value
A numeric vector of relative humidity (in %)
Note
Equations are from the source code for the US National Weather Service's online heat index calculator.
Author(s)
Brooke Anderson brooke.anderson@colostate.edu, Roger Peng rdpeng@gmail.com
References
National Weather Service Hydrometeorological Prediction Center Web Team. Heat Index Calculator. 30 Jan 2015. http://www.wpc.ncep.noaa.gov/html/heatindex.shtml. Accessed 18 Dec 2015.
See Also
humidity.to.dewpoint,
fahrenheit.to.celsius,
celsius.to.fahrenheit
,
convert_temperature
Examples
# Calculate relative humidity from air temperature and
# dew point temperature.
data(lyon)
lyon$RH <- dewpoint.to.humidity(t = lyon$TemperatureC,
dp = lyon$DewpointC,
temperature.metric = 'celsius')
lyon
Convert from Fahrenheit to Celsius.
Description
fahrenheit.to.celsius
creates a numeric vector of temperatures in
Celsius from a numeric vector of temperatures in Fahrenheit.
Usage
fahrenheit.to.celsius(T.fahrenheit, round = 2)
Arguments
T.fahrenheit |
Numeric vector of temperatures in Fahrenheit. |
round |
An integer indicating the number of decimal places to round the converted value. |
Value
A numeric vector of temperature values in Celsius.
Note
Equations are from the source code for the US National Weather Service's online heat index calculator.
Author(s)
Brooke Anderson brooke.anderson@colostate.edu, Roger Peng rdpeng@gmail.com
See Also
Examples
# Convert from Fahrenheit to Celsius.
data(norfolk)
norfolk$TempC <- fahrenheit.to.celsius(norfolk$TemperatureF)
norfolk
Convert from Fahrenheit to Kelvin.
Description
fahrenheit.to.kelvin
creates a numeric vector of temperatures in
Kelvin from a numeric vector of temperatures in Fahrenheit.
Usage
fahrenheit.to.kelvin(T.fahrenheit, round = 2)
Arguments
T.fahrenheit |
Numeric vector of temperatures in Fahrenheit. |
round |
An integer indicating the number of decimal places to round the converted value. |
Value
A numeric vector of temperature values in Kelvin.
Note
Equations are from the source code for the National Oceanic and Atmospheric Association's online temperature converter.
Author(s)
#' Joshua Ferreri joshua.m.ferreri@gmail.com, Brooke Anderson brooke.anderson@colostate.edu
See Also
Examples
# Convert from Fahrenheit to Kelvin.
data(norfolk)
norfolk$TempuratureK <- fahrenheit.to.kelvin(norfolk$TemperatureF)
norfolk
Weather in Fort Collins, CO
Description
A dataset containing daily values of mean temperature (Fahrenheit) and mean wind speed (in knots) for the week of October 11, 2015, in Fort Collins, CO.
Usage
foco
Format
A data frame with 7 rows and 3 variables:
- date
Date of weather observation
- TemperatureF
Daily mean temperature in Fahrenheit
- knots
Daily mean wind speed in knots
Source
Calculate heat index.
Description
heat.index
creates a numeric vector of heat index values from
numeric vectors of air temperature and either relative humidity or
dew point temperature.
Usage
heat.index(t = NA, dp = c(), rh = c(),
temperature.metric = "fahrenheit", output.metric = NULL, round = 0)
Arguments
t |
Numeric vector of air temperatures. |
dp |
Numeric vector of dew point temperatures. |
rh |
Numeric vector of relative humidity (in %). |
temperature.metric |
Character string indicating the temperature metric of air temperature and dew point temperature. Possible values are 'fahrenheit' or 'celsius'. |
output.metric |
Character string indicating the metric into which heat index should be calculated. Possible values are 'fahrenheit' or 'celsius'. |
round |
Integer indicating the number of decimal places to round converted value. |
Details
Include air temperature (t
) and either dew point
temperature (dp
) or relative humdity (rh
). You cannot
specify both dew point temperature and relative humidity– this will
return an error. Heat index is calculated as NA
when impossible
values of dew point temperature or humidity are input (e.g., humidity
above 100% or below 0%, dew point temperature above air temperature).
Value
A numeric vector of heat index values in the metric specified
by output.metric
. (If output.metric
is not specified,
heat index will be returned in the same metric in which air
temperature was input, specified by temperature.metric
.)
Note
Equations are from the source code for the US National Weather Service's online heat index calculator.
Author(s)
Brooke Anderson brooke.anderson@colostate.edu, Roger Peng rdpeng@gmail.com
References
Anderson GB, Bell ML, Peng RD. 2013. Methods to calculate the heat index as an exposure metric in environmental health research. Environmental Health Perspectives 121(10):1111-1119.
National Weather Service Hydrometeorological Prediction Center Web Team. Heat Index Calculator. 30 Jan 2015. http://www.wpc.ncep.noaa.gov/html/heatindex.shtml. Accessed 18 Dec 2015.
Rothfusz L. 1990. The heat index (or, more than you ever wanted to know about heat index) (Technical Attachment SR 90-23). Fort Worth: Scientific Services Division, National Weather Service.
R. Steadman, 1979. The assessment of sultriness. Part I: A temperature-humidity index based on human physiology and clothing science. Journal of Applied Meteorology, 18(7):861–873.
Examples
# Calculate heat index from temperature (in Fahrenheit)
# and relative humidity.
data(suffolk)
suffolk$heat.index <- heat.index(t = suffolk$TemperatureF,
rh = suffolk$Relative.Humidity)
suffolk
# Calculate heat index (in Celsius) from temperature (in
# Celsius) and dew point temperature (in Celsius).
data(lyon)
lyon$heat.index <- heat.index(t = lyon$TemperatureC,
dp = lyon$DewpointC,
temperature.metric = 'celsius',
output.metric = 'celsius')
lyon
Algorithm for heat.index function.
Description
heat.index.algorithm
converts a numeric scalar of temperature
(in Fahrenheit) and a numeric scalar of relative humidity (in %)
to heat index (in Fahrenheit). This function is not meant to be used
outside of the heat.index
function.
Usage
heat.index.algorithm(t = NA, rh = NA)
Arguments
t |
Numeric scalar of air temperature, in Fahrenheit. |
rh |
Numeric scalar of relative humidity, in %. |
Details
If an impossible value of relative humidity is given
(below 0% or above 100%), heat index is returned as NA
.
Value
A numeric scalar of heat index, in Fahrenheit.
Note
Equations are from the source code for the US National Weather Service's online heat index calculator.
Author(s)
Brooke Anderson brooke.anderson@colostate.edu, Roger Peng rdpeng@gmail.com
References
Anderson GB, Bell ML, Peng RD. 2013. Methods to calculate the heat index as an exposure Metric in environmental health research. Environmental Health Perspectives 121(10):1111-1119.
National Weather Service Hydrometeorological Prediction Center Web Team. Heat Index Calculator. 30 Jan 2015. http://www.wpc.ncep.noaa.gov/html/heatindex.shtml. Accessed 18 Dec 2015.
Rothfusz L. 1990. The heat index (or, more than you ever wanted to know about heat index) (Technical Attachment SR 90-23). Fort Worth: Scientific Services Division, National Weather Service.
R. Steadman, 1979. The assessment of sultriness. Part I: A temperature-humidity index based on human physiology and clothing science. Journal of Applied Meteorology, 18(7):861–873.
See Also
Calculate dew point temperature.
Description
humidity.to.dewpoint
creates a numeric vector of dew point
temperature from numeric vectors of air temperature and relative
humidity.
Usage
humidity.to.dewpoint(rh = NA, t = NA, temperature.metric = "fahrenheit")
Arguments
rh |
Numeric vector of relative humidity (in %). |
t |
Numeric vector of air temperatures. |
temperature.metric |
Character string indicating the temperature
metric of air temperature. Possible values are |
Details
Dew point temperature will be calculated in the same metric as
the temperature vector (as specified by the temperature.metric
option). If you'd like dew point temperature in a different metric,
use the function celsius.to.fahrenheit
or
fahrenheit.to.celsius
on the output from this function.
Value
A numeric vector of dew point temperature, in the same metric
as the temperature vector (as specified by the temperature.metric
option).
Note
Equations are from the source code for the US National Weather Service's online heat index calculator.
Author(s)
Brooke Anderson brooke.anderson@colostate.edu, Roger Peng rdpeng@gmail.com
References
National Weather Service Hydrometeorological Prediction Center Web Team. Heat Index Calculator. 30 Jan 2015. http://www.wpc.ncep.noaa.gov/html/heatindex.shtml. Accessed 18 Dec 2015.
See Also
dewpoint.to.humidity,
fahrenheit.to.celsius,
celsius.to.fahrenheit
Examples
# Calculate dew point temperature from relative humidity and
# air temperature.
data(newhaven)
newhaven$DP <- humidity.to.dewpoint(t = newhaven$TemperatureF,
rh = newhaven$Relative.Humidity,
temperature.metric = 'fahrenheit')
newhaven
Convert from inches to standard metric units of measure for precipitation
Description
inches_to_metric
creates a numeric vector of precipitation in
common metric units (millimeters or centimeters) from a numeric vector of
precipitation in inches.
Usage
inches_to_metric(inches, unit, round = 2)
Arguments
inches |
Numeric vector of precipitation (in inches) |
unit |
Character specifying the metric precipitation unit besides inches. Possible values are:
|
round |
An integer indicating the number of decimal places to round the converted value. |
Value
A numeric vector of precipitation (in specified metric unit)
Note
Equations are from the source code for the National Weather Service Forecast Office http://www.srh.noaa.gov/ama/?n=conversions
Author(s)
Joshua Ferreri joshua.m.ferreri@gmail.com, Brooke Anderson brooke.anderson@colostate.edu
References
http://www.srh.noaa.gov/ama/?n=conversions
See Also
Examples
data(breck)
breck$Precip.mm <- inches_to_metric(breck$Precip.in,
unit = "mm",
round = 2)
breck
Convert from Kelvin to Celsius.
Description
kelvin.to.celsius
creates a numeric vector of temperatures in
Celsius from a numeric vector of temperatures in Kelvin.
Usage
kelvin.to.celsius(T.kelvin, round = 2)
Arguments
T.kelvin |
Numeric vector of temperatures in Kelvin. |
round |
An integer indicating the number of decimal places to round the converted value. |
Value
A numeric vector of temperature values in Celsius.
Note
Equations are from the source code for the National Oceanic and Atmospheric Association's online temperature converter.
Author(s)
Joshua Ferreri joshua.m.ferreri@gmail.com, Brooke Anderson brooke.anderson@colostate.edu
See Also
Examples
# Convert from Kelvin to Celsius.
data(angeles)
angeles$TemperatureC <- kelvin.to.celsius(angeles$TemperatureK)
angeles
Convert from Kelvin to Fahrenheit.
Description
kelvin.to.fahrenheit
creates a numeric vector of temperatures in
Fahrenheit from a numeric vector of temperatures in Kelvin.
Usage
kelvin.to.fahrenheit(T.kelvin, round = 2)
Arguments
T.kelvin |
Numeric vector of temperatures in Kelvin. |
round |
An integer indicating the number of decimal places to round the converted value. |
Value
A numeric vector of temperature values in Fahrenheit.
Note
Equations are from the source code for the National Oceanic and Atmospheric Association's online temperature converter.
Author(s)
Joshua Ferreri joshua.m.ferreri@gmail.com, Brooke Anderson brooke.anderson@colostate.edu
See Also
Examples
# Convert from Kelvin to Fahrenheit.
data(angeles)
angeles$TemperatureF <- kelvin.to.fahrenheit(angeles$TemperatureK)
angeles
Convert from knots to standard units of wind speed
Description
knots_to_speed
creates a numeric vector of speed, in units
specified by unit
, from a numeric vector of speed in knots.
Usage
knots_to_speed(knots, unit, round = 1)
Arguments
knots |
Numeric vector of speeds in knots |
unit |
Character specifying the speed unit other than knots. Possible values are:
|
round |
An integer indicating the number of decimal places to round the converted value. |
Details
Output will be in the speed units specified by unit
.
Value
A numeric vector of speeds (in the specified unit)
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
Examples
data(foco)
foco$mph <- knots_to_speed(foco$knots, unit = "mph", round = 0)
foco$mps <- knots_to_speed(foco$knots, unit = "mps", round = NULL)
foco$ftps <- knots_to_speed(foco$knots, unit = "ftps")
foco$kmph <- knots_to_speed(foco$knots, unit = "kmph")
foco
Precipitation in Loveland, CO
Description
Daily values of precipitation (millimeters) for the week of September 8, 2013, in Loveland, CO.
Usage
loveland
Format
A data frame 7 rows and 2 variables:
- date
Date of weather observation
- Precip.mm
Daily precipitation in millimeters
Source
Weather in Lyon, France
Description
Daily values of mean temperature (Celsius) and mean dew point temperature (Celsius) for the week of June 18, 2000, in Lyon, France.
Usage
lyon
Format
A data frame with columns:
- Date
Date of weather observation
- TemperatureC
Daily mean temperature in Celsius
- DewpointC
Daily mean dewpoint temperature in Celsius
Source
Convert between standard metric units of measure for precipitation to inches
Description
metric_to_inches
creates a numeric vector of precipitation measures in
inches from a numeric vector of precipitation in common metric units
(millimeters or centimeters).
Usage
metric_to_inches(metric, unit.from, round = 2)
Arguments
metric |
Numeric vector of precipitation (in millimeters or centimeters) |
unit.from |
A character string with the current units of the observations (i.e., the units from which you want to convert) |
round |
An integer indicating the number of decimal places to round the converted value. |
Value
A numeric vector of precipitation in inches.
Note
Equations are from the source code for the National Weather Service Forecast Office http://www.srh.noaa.gov/ama/?n=conversions
Author(s)
Joshua Ferreri joshua.m.ferreri@gmail.com, Brooke Anderson brooke.anderson@colostate.edu
References
http://www.srh.noaa.gov/ama/?n=conversions
See Also
Examples
data(loveland)
loveland$Precip.in <- metric_to_inches(loveland$Precip.mm,
unit.from = "mm",
round = 2)
loveland
Weather in New Haven, CT
Description
Daily values of mean temperature (Fahrenheit) and mean relative humidity (%) for the week of October 19, 2008, in New Haven, CT.
Usage
newhaven
Format
A data frame with columns:
- Date
Date of weather observation
- TemperatureF
Daily mean temperature in Fahrenheit
- Relative.Humidity
Daily relative humidity in %
Source
Weather in Norfolk, VA
Description
Daily values of mean temperature (Fahrenheit) and mean dew point temperature (Fahrenheit) for the week of March 12, 2006, in Norfolk, VA.
Usage
norfolk
Format
A data frame with columns:
- Date
Date of weather observation
- TemperatureF
Daily mean temperature in Fahrenheit
- DewpointF
Daily mean dewpoint temperature in Fahrenheit
Source
Weather in San Jose, Costa Rica
Description
Daily values of mean temperature (Fahrenheit) and mean wind speed (miles per hour) for the week of August 02, 2015, in San Jose, Costa Rica.
Usage
puravida
Format
A data frame 7 rows and 3 variables:
- date
Date of weather observation
- TemperatureF
Daily mean temperature in Fahrenheit
- mph
Daily mean wind speed in miles per hour
Source
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 |
Character specifying the speed unit other than knots. Possible values are:
|
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
Examples
data(beijing)
beijing$knots <- speed_to_knots(beijing$kmph, unit = "kmph", round = 2)
beijing
Weather in Suffolk, VA
Description
Daily values of mean temperature (Fahrenheit) and mean relative humidity (%) for the week of July 12, 1998, in Suffolk, VA.
Usage
suffolk
Format
A data frame with columns:
- Date
Date of weather observation
- TemperatureF
Daily mean temperature in Fahrenheit
- Relative.Humidity
Daily relative humidity in %