parse_parameter_description {pmxpartab}R Documentation

Parse a parameter description string

Description

Parse a parameter description string

Usage

parse_parameter_description(string)

Arguments

string

A character, starting with a name, followed by an optional comma separated list of key-value pairs that can be parsed as R code. See Examples.

Value

A named list.

Examples

# Example 1: all elements present
x <- "CL, label='Clearance', units='L/h', trans=exp, type='Structural'"
parse_parameter_description(x)

# Example 2: Some elements missing (trans), will take default value (NULL)
x <- "CL, label='Clearance', units='L/h', type='Structural'"
parse_parameter_description(x)

# Example 3: Only the name is given
x <- "CL"
parse_parameter_description(x)

# Example 4: positional arguments
x <- "CL, 'Clearance', 'L/h', type='Structural'"
parse_parameter_description(x)

[Package pmxpartab version 0.5.0 Index]