View source: R/count_growing_days.R
count_growing_days | R Documentation |
Count number of days that were suitable for growth
count_growing_days(
dat,
...,
heat_threshold = 18,
n_hours = 24,
trend_threshold = 4,
superchill_threshold = -0.7,
max_season = 540,
full_season = TRUE,
rm_gap_days = FALSE,
gap_length = 2,
gap_warning = 6,
quiet = TRUE
)
dat |
Data frame with at least three columns: |
... |
Additional columns in |
heat_threshold |
The threshold for heat stress. Default is
|
n_hours |
Length of heat stress interval in hours (default is
|
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 |
full_season |
Logical argument. The default, If |
rm_gap_days |
Logical argument indicating whether to remove days with data gaps when counting n_growing_days. |
gap_length |
The length of time in hours to consider a sampling gap. Default is gap_length = 2 hours, which is twice the sampling interval of the least frequent sensor. The total sample gap length (sum of all sample gaps) is subtracted from the number of stocked days to calculate the number of growing days. |
gap_warning |
The length of time in hours to consider a substantial
sampling gap. A warning can be printed if any gaps exceed this duration.
Default is |
quiet |
Logical argument to suppress Warning message when gap lengths
exceed |
Days suitable for growth are days that remain after applying season and heat stress filters. Option to remove days with data gaps (otherwise the assumption is that the temperature on these days is the average temperature of the data series).
Results are automatically grouped by SEASON
and DEPTH
.
Runs filter_in_growing_seasons() if no SEASON column in the data. If there is not a full season of data, make sure to set argument full_season = FALSE or add a SEASON column to dat.
Returns a tibble with columns: ...
, DEPTH
,
SEASON
, START_SEASON
(minimum TIMESTAMP for each group),
END_SEASON
(maximum TIMESTAMP for each group), STOCKED_DAYS
(difftime(END_SEASON, START_SEASON, units = "days")
),
n_filtered_days
(calculated from
identify_heat_stress_events
), and n_growing_days
(STOCKED_DAYS - n_filtered_days).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.