View source: R/events_phase_plots.R
| dm_event_climate_test | R Documentation |
Tests whether an event-based climate variable differs between groups such as phases or event types.
dm_event_climate_test(
event_data,
climate_var,
group_var = c("Phase", "event_type"),
by = c("none", "month", "month_of_year", "year"),
Year = NULL,
DOY = NULL,
method = c("auto", "anova", "kruskal", "t.test", "wilcox")
)
event_data |
Output of |
climate_var |
Name of the climate-derived column to test. |
group_var |
Grouping variable. One of |
by |
One of |
Year |
Optional numeric year or vector of years for filtering. |
DOY |
Optional numeric vector of length 2 for filtering. |
method |
One of |
A list with summary statistics, overall tests, and pairwise tests.
data(gf_nepa17)
data(ktm_clim_hourly)
zg <- phase.zg(df = gf_nepa17[1:800, ], TreeNum = 1)
evt_zg <- dm_event_climate(
zg,
ktm_clim_hourly,
event = "phase_start",
windows = c(0, 3, 6, 12, 24),
mean_vars = c("temp", "VPD", "RH"),
max_vars = c("VPD"),
sum_vars = c("prec")
)
tst <- dm_event_climate_test(
evt_zg,
climate_var = "VPD_mean_prev_6h",
group_var = "Phase",
by = "month_of_year",
method = "auto"
)
tst$summary
tst$overall_tests
head(tst$pairwise_tests)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.