This function can parse a string in the format R1:0.1;R2:0.4;R3:0.9 to extract a 3-dimensional named vector with names R1, R2 and R3, and values 0.1, 0.4 and 0.9.

This function can be used when parsing an input dataset in revolver_cohort, the function that creates a REVOLVER cohort.

CCF_parser(x)

Arguments

x

The string to parse, the accepted format for this function is something like R1:0.1;R2:0.4;R3:0.9.

Value

A parsed named vector.

Note

This function will not convert the types of the parsed entries.

See also

Examples

# The output is a string 3-dimensional vector CCF_parser("R1:0.1;R2:0.4;R3:0.9")
#> R1 R2 R3 #> "0.1" "0.4" "0.9"