write_model_result_csv {pam}R Documentation

Write Model Result CSV

Description

This function exports the raw input data, 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 frame containing the raw input 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?tab=readme-ov-file#write_model_result_csv

Value

No return value, called for side effects

Examples

path <- file.path(system.file("extdata", 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)


[Package pam version 1.0.2 Index]