parse_inputs: Parse and validate input specifications

View source: R/simulate_custom.R

parse_inputsR Documentation

Parse and validate input specifications

Description

This function validates the provided data, model, and metric specifications, and returns corresponding generator functions for each. It ensures that all required inputs are provided and correctly configured.

Usage

parse_inputs(data_spec, metric, model)

Arguments

data_spec

A list containing two elements:

type

A character string indicating the outcome type.

args

A list of arguments to be passed to the data-generating function.

metric

A character vector specifying one or more metrics to be used. Currently, only the first element is used.

model

A character string specifying the model to be used.

Details

This function calls default_data_generators(), default_model_generators(), and default_metric_generator() to construct the appropriate functions based on the supplied inputs.

Value

A list containing three elements:

data_function

The data-generating function.

model_function

The model-generating function.

metric_function

The metric function corresponding to the chosen metric.


pmsims documentation built on Nov. 15, 2026, 5:07 p.m.