plotSensor: Plot wind speed/direction as a time series

Description Usage Arguments Details Value Examples

Description

plotSensor returns speed and/or direction time series as a ggplot2 object

Usage

1
2
plotSensor(df, sensor, var = "speed", dir_symbol = "vector",
  threshold = NULL)

Arguments

df

dataframe

sensor

name of sensor ('plot')

var

variable to plot ('speed', 'direction', or 'both')

dir_symbol

symbol to use for direction if var=='both'.

threshold

threshold speed to indicate with horizontal bar; only shown when speed is plotted

Details

This fucntion creates a ggplot2 object of wind speed and/or direction vs. time for a single sensor. If var=='both' and dir_symbol != 'vector', direction will be plotted as points. This object includes two y-axes and is created using gtable and cannot be captured by the function; instead it is drawn when the function runs. All other plots are returned as ggplot2 objects.

Value

ggplot2 object (unless var=='both' and dir_sybmol != 'vector')

Examples

1
2
data(wind)
plotSensor(wind, 'R26', var='both')

nwagenbrenner/windtools documentation built on May 24, 2019, 10:56 a.m.