appendInputParams {npboottprmFBar} | R Documentation |
Append Input Parameters to persimon_app Simulation Results
Description
This internal function combines simulation results with success rates and input parameters. It prepares the data for storage in the database by appending all relevant information from a single simulation run.
Usage
appendInputParams(df_results, df_success, input)
Arguments
df_results |
A data frame containing the main simulation results. |
df_success |
A data frame containing the counts of successful model runs. |
input |
A list of input values from the Shiny app, including simulation parameters. |
Details
This function performs several steps:
Appends '_success' to the column names of df_success (except n1, n2, n3).
Combines df_results with the modified df_success.
Generates a unique run code for the simulation.
Creates a data frame of input parameters.
Repeats the input parameters to match the number of rows in the results.
Combines all the above into a single data frame.
Value
A data frame combining simulation results, success rates, and input parameters. The returned data frame includes:
All columns from df_results
Success rate columns from df_success (appended with '_success')
Input parameters (M1, S1, M2, S2, M3, S3, Sk1, Sk2, Sk3, n_simulations, nboot, conf_level)
A unique RunCode for the simulation