Learn R Programming

dfexpand (version 0.0.2)

getDistinctValues: dfexpand

Description

Methods to auto-expand a delimited string into a list of unique values

Usage

getDistinctValues(entry, delimiter, trim = TRUE, ignore_case = FALSE)

Value

list

A list of distinct values found in the entry string

Arguments

entry

A string to parse.

delimiter

A single character to split the string on.

trim

Boolean flag to signify if the leading and trailing whitespace should be trimmed for each value found.

ignore_case

Boolean flag to indicate if the unique values extracted should ignore case differences or not.

Examples

Run this code
  values <- getDistinctValues("a;b;c", ';')

Run the code above in your browser using DataLab