toKeysAndValues: Key Value String to List of Keys and Values

View source: R/convert.R

toKeysAndValuesR Documentation

Key Value String to List of Keys and Values

Description

Converts a string of the form "a=1,b=2" to a list with elements keys (here: c("a", "b")) and values (here: (1,2)).

Usage

toKeysAndValues(x, separators = c(",", "="))

Arguments

x

character vector of length 1

separators

character vector of length 2 representing two types of separators. The first (default: ",") is used to split x into single key = value assignments. The second (default: "=") is used to split each assignment into key and value.

Value

list with elements keys and values


KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.