View source: R/filter_in_growing_seasons.R
filter_in_growing_seasons | R Documentation |
Keep observations that occur during growing seasons
filter_in_growing_seasons(
dat,
full_season = TRUE,
trend_threshold = 4,
superchill_threshold = -0.7,
max_season = 540
)
dat |
Data frame with at least three columns: |
full_season |
Logical argument. The default, If |
trend_threshold |
The threshold for "trending up". Default is
|
superchill_threshold |
The threshold for "superchill". Default is
|
max_season |
The length of the growing season in months for groups that
have no temperature observations below |
Keeps observations that occur during growing seasons as defined by
identify_growing_seasons()
(i.e., filters out observations that do
not occur during the growing seasons).
The growing season starts when the temperature crosses
trend_threshold
and does not return below trend_threshold
(e.g., 4-degrees trending up) and ends 1 minute before the first
observation of superchill_threshold
.
The function looks for START_SEASON
in January to August to avoid
temperature drops caused by hurricanes (typically in September and October)
and Winter cooling (November, December).
The function looks for END_SEASON
in January to May of the next year
(spring superchill).
Returns dat
, filtered to keep observations that occur during
growing seasons identified in identify_growing_seasons
, with an
additional column SEASON
to label the seasons ("S1", "S2", ...).
Observations may be duplicated in consecutive seasons.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.