Writes the main tables of an aridagri result to an Excel workbook (one
sheet per table) or a CSV file. Multi-trait tables from
anova_traits are written as they appear in the report.
Usage
export_results(x, file, format = "xlsx", digits = 3, verbose = TRUE)
Arguments
- x
An aridagri result object or a data frame.
- file
Output file path.
- format
"xlsx" (default; needs writexl) or
"csv" (the first table only).
- digits
Number of decimal places for numeric columns.
- verbose
Logical. If TRUE (default), prints the file name.
Value
Invisibly returns the file path.
Author
Lalit Kumar Rolaniya, Ram Lal Jat, Monika Punia, Raja Ram
Choudhary, Hemant Poonia
Examples
data(mothbean_rbd)
res <- anova_rbd(mothbean_rbd, "seed_yield", "treatment", "block",
verbose = FALSE)
export_results(res, tempfile(fileext = ".csv"), format = "csv")
#> Results exported to: /tmp/RtmpaKpcKI/file18842d35e778.csv