write_model_result_csv: Write Model Result CSV

View source: R/write_model_result_csv.R

write_model_result_csvR Documentation

Write Model Result CSV

Description

This function exports the intermediate data table, regression data, and model parameters into separate CSV files for easy access and further analysis.

Usage

write_model_result_csv(dest_dir, name, data, model_result)

Arguments

dest_dir

A character string specifying the directory where the CSV files will be saved.

name

A character string specifying the base name for the output files.

data

A data.table containing the intermediate data used in the model.

model_result

A list containing the model results, including parameter values and regression data.

Details

This function generates three CSV files:

  1. raw_data.csv: Contains the original raw data used in the model.

  2. regression_data.csv: Includes the regression data with predicted electron transport rate (ETR) values.

  3. model_result.csv: Summarizes the parameter values derived from the model results (excluding regression data), such as alpha or beta.

The 'name' parameter serves as a prefix for each file, ensuring clarity and organization in the output directory. A detailed documentation can be found under https://github.com/biotoolbox/pam/tree/main#functions

Value

No return value, called for side effects

Examples

path <- file.path(system.file("extdata/dual_pam_data", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- eilers_peeters_generate_regression_ETR_I(data)
write_model_result_csv(tempdir(), "20240925", data, result)


pam documentation built on April 30, 2026, 5:06 p.m.