Description Usage Arguments Details Value Examples
plotSensor
returns speed and/or direction time series as a ggplot2 object
1 2 | plotSensor(df, sensor, var = "speed", dir_symbol = "vector",
threshold = NULL)
|
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 |
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.
ggplot2 object (unless var=='both' and dir_sybmol != 'vector')
1 2 | data(wind)
plotSensor(wind, 'R26', var='both')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.