appendInputParams_pgsql: Append Input Parameters to Simulation Results (PostgreSQL...

View source: R/replext_helpers_pgsql.R

appendInputParams_pgsqlR Documentation

Append Input Parameters to Simulation Results (PostgreSQL Integration)

Description

This internal helper function appends the user-specified input parameters to each row of the simulation results data frame. This function is used to provide a complete record of the parameters used for each simulation run. The *_pgsql version of the function was built for integration with PostgreSQL

Usage

appendInputParams_pgsql(df, input)

Arguments

df

A data frame containing the simulation results.

input

A list containing the user input parameters from the Shiny application.

Details

The function first generates a unique identifier for each simulation run. It then constructs a data frame of the input parameters based on the selected simulation type (either 'replext_t1_' or 'replext_t2_'). The input parameters are repeated to match the number of rows in the results data frame and then appended to it. This augmented data frame provides a comprehensive view of the results and the parameters used to generate them.

Value

A data frame combining the original simulation results with a row-wise repetition of the input parameters for each simulation run.


mmirestriktor documentation built on June 24, 2024, 1:07 a.m.