Learn R Programming

pam (version 2.0.0)

write_model_result_csv: 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)

Value

No return value, called for side effects

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?tab=readme-ov-file#write_model_result_csv

Examples

Run this code
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)

Run the code above in your browser using DataLab