Learn R Programming

nlmixr2auto (version 1.0.0)

parseParams: Parse string vector to model parameters

Description

Converts a numeric vector of parameter values into a named list of model parameters based on the search space configuration.

Usage

parseParams(string, config)

Value

A named list containing:

  • All parameters specified in config$params with their values

  • Computed dependent parameters based on param_dependencies

  • Fixed parameters from fixed_params

  • Administration route from config$route

Arguments

string

Numeric vector containing parameter values in the order specified by the search space configuration

config

List object returned by spaceConfig(), containing parameter definitions and dependencies

Author

Zhonghui Huang

Details

This function performs three main operations:

  1. Maps the input vector to named parameters

  2. Computes dependent parameter values using defined functions

  3. Adds fixed parameters and route information

See Also

spaceConfig(), mod.run()

Examples

Run this code
# Example 1: Parse IV base model parameters
config_iv <- spaceConfig("ivbase")
parseParams(c(2, 1, 1, 0, 0, 1, 1, 0, 1, 1), config_iv)

# Example 2: Parse oral base model parameters
config_oral <- spaceConfig("oralbase")
parseParams(c(2, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1), config_oral)

# Example 3: Parse custom configuration parameters
custom_config <- list(route = "oral", params = c("no.cmpt", "eta.cl", "eta.vc"),
                      param_dependencies = list(), fixed_params = list(mm = 0))
parseParams(c(1, 1, 1), custom_config)

Run the code above in your browser using DataLab