[R] Attempting to plot two different time series together

Ezra Boyd ezgis76 at gmail.com
Thu Nov 5 16:00:18 CET 2015


Hello,

I am trying to create a plot (I guess two plots) using two different time
series datasets, but I'm not sure of the best approach.  The data is from a
tidal surge due to a hurricane and I would like to show the relationship
between stage and windspeed/direction.

One dataset is the tidal stage and it is sampled in 30 minutes intervals.
The other dataset is windspeed and direction and it is sampled every 6
minutes.  I would like to display the tidal hydrograph and then also show
windspeed and direction as a banner above it.  They would be two separate
plots, but with identical x-axis (as opposed to one plot that has both tide
& wind.)

Should I combine the two time series into one dataframe (with lots of NAs)
so that I can create the plots together, for example using pairs or
ggpairs? Or should I keep them separate, make the individual plots, and
then work on the layout in graphic design software? I would prefer the
former, but I just can't figure out how to make that work out.

Also, is it possible to depict wind direction (which is given in degree
clockwise from due north) with an arrow?

Thank you very much,

Ezra

-- 
Ezra Boyd, PhD
DisasterMap.net, LLC <http://DisasterMap.net>
ezgis <ezgis76 at gmail.com>76 at gmail.com <ezgis76 at gmail.com>
(504)533-4447

	[[alternative HTML version deleted]]



More information about the R-help mailing list