gdd_export: Save Degree-Day Analysis Results

View source: R/gdd_export.R

gdd_exportR Documentation

Save Degree-Day Analysis Results

Description

Saves the analysis results as CSV (UTF-8) or xlsx. The summary table (results, one row per group) is always written; the model-comparison table (available when model = "auto" was used), per-group coefficient tables with confidence intervals, and the cleaned data can be included optionally.

Usage

gdd_export(
  x,
  file = "gdd_results.csv",
  include_data = FALSE,
  include_coefs = FALSE,
  include_comparison = TRUE,
  ...
)

Arguments

x

A "gdd" object returned by [gdd_calc()].

file

Output path; the format is chosen by the extension (.csv / .xlsx).

include_data

Logical; whether to also write the cleaned data. Default FALSE.

include_coefs

Logical; whether to write the per-group coefficient tables (estimate, SE, t, p, CI). Default FALSE.

include_comparison

Logical; whether to write the model comparison table when it exists (only "auto" mode). Default TRUE.

...

Further arguments passed to write.csv (CSV mode).

Examples


f <- system.file("extdata", "gdd_example.csv", package = "insectecol")
fit <- gdd_calc(gdd_read(f), by = "stage")
gdd_export(fit, tempfile(fileext = ".csv"))


insectecol documentation built on Oct. 5, 2026, 5:08 p.m.