Learn R Programming

madrat (version 3.15.6)

toolSplitSubtype: Tool: SplitSubtype

Description

This function can split a subtype string into smaller entities based on a given separator and check whether these entities exist in a reference list

Usage

toolSplitSubtype(subtype, components, sep = ":")

Value

A named list with the different entities of the given subtype

Arguments

subtype

A character string which can be split with the given separator into smaller entities

components

A named list with the same length as the subtype has entities. Names of the list are used as names of the entities while the content of each list element represents the allowed values of that given entity. If all values are allowed use NULL as entry.

sep

separator to be used for splitting

Author

Jan Philipp Dietrich

Examples

Run this code
toolSplitSubtype("mymodel:myversion:myworld", list(model=c("mymodel","notmymodel"), 
                                                   version=c("myversion","42"), 
                                                   world="myworld"))

Run the code above in your browser using DataLab