View source: R/lubridate-pacea-series.R
lubridate_pacea_series | R Documentation |
Called from 'plot.pacea_index()' and others to give a lubrdiate column for easier plotting.
lubridate_pacea_series(obj, smooth_over_year = FALSE)
obj |
a 'pacea_index' object, which is a time series. |
smooth_over_year |
logical to smooth monthly values over each calendar year (as per Tetjana Ross' plots, see '?oni' for reference). Note that the corresponding 'date' is for 1st January of each year. |
original object with month values smoothed (averaged) over the year if requested, and a new 'date' column in lubridate format. Sets a resulting date to be the first of the month or Jan 1st of that year (as appropriate), for easy plotting, but note that these should not be taken as exact dates, which is why we saved the original objects just as year and/or month, not lubridate dates.
Andrew Edwards
## Not run:
lubridate_pacea_series(oni)
lubridate_pacea_series(oni, smooth_over_year=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.