R/rbms_organize_data.r
ts_monit_season.Rd
ts_monit_season Build a time-series of dates with specific detail about the monitoring season
ts_monit_season(
d_series,
StartMonth = 4,
EndMonth = 9,
StartDay = 1,
EndDay = NULL,
CompltSeason = TRUE,
Anchor = TRUE,
AnchorLength = 7,
AnchorLag = 7,
TimeUnit = "d"
)
time series of dates returned by ts_dwmy_table
integer for the first month of the monitoring season, default=4
integer for the last month of the monitoring season, default=9
integer for the day of the month when the monitoring season start, default=1
integer for the day of the month when the monitoring season end, default=last day of the EndMonth
logical if only the date for a complete season should be returned, default=TRUE
logical if Anchor should be used at the beginning and end of the monitoring season, default=TRUE
integer for the number of day used as Anchor, default=7
integer for the number of days before and after where the Anchor should start, default=TRUE
character defining the time unit used for the Anchor, can be 'd' for day or 'w' for week
A data.table with the entire time-series of date (DATE
, DAY_SINCE
, YEAR
, MONTH
,
DAY
, WEEK
(ISO), the WEEK_DAY
, and details about the Monitoring Year (M_YEAR
) which
is the monitoring year to which that date refers to, using the year of the starting month of the monitoring season,
the monitoring season (M_SEASON
), if the Monitoring season is complete (COMPLT_SEASON
), the
location of the anchors (ANCHOR
) and the count for every day used as anchor (0).
The monitoring season can start in year y and end in year y+1, so if the monitoring season goes over two years (i.e. winter, December-January) the SEASON YEAR is shifted to set the monitoring season within a continuous year named according to the year at the start. Here the monitoring season is set in the middle or year' to give some room to set ANCHORs before and after the monitoring season.