| gdd_check | R Documentation |
Non-stopping validation of a long-format development data frame (one
row per observation with temperature and duration columns), i.e. the
layout required by gdd_calc. Reports per-row problems
(missing / non-numeric / non-positive values), a per-group summary
(sample sizes, temperature coverage) and a linear-range check: if
the highest mean developmental rate is not reached at the highest
temperature, the data contain a high-temperature decline and the
linear model must not be fitted to the full range.
gdd_check(data, temp_col = NULL, duration_col = NULL, by = NULL)
data |
A data.frame with temperature and duration columns. |
temp_col, duration_col |
Column names (auto-detected by default). |
by |
Optional grouping variable(s), as in |
A list:
valid |
logical vector, one entry per row of |
problems |
data.frame (row, column, reason); empty if none |
group_summary |
data.frame per group: n, n_temp, temperature and duration ranges |
linear_check |
data.frame per group: temperature of the
maximal mean rate, highest temperature, |
data |
the valid rows, standardised to columns temp / duration / rate / group (NULL if no valid row remains) |
gdd_read,
gdd_calc
f <- system.file("extdata", "gdd_example.csv", package = "insectecol")
chk <- gdd_check(gdd_read(f), by = "stage")
chk$group_summary # per-group sample sizes and ranges
chk$linear_check # is the maximal mean rate at the highest temperature?
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.