Simplify: Collapse a complex array into unique components

Description Usage Arguments Value

Description

Given a vector or list, break into atomic units, remove any redundancies and return a vector of unique elements

Usage

1
2
Simplify(x, delim = "; ", unique = F, na.rm = T, ignore.case = T,
  sort = T, missing.value = "NA", null.return = NA)

Arguments

x

Vector or list. This can contain all valid element types, however the current version always returns a character type.

delim

A non-null character use to both split complex character strings, and delimit output string elements containing more than one element.

unique

Logical If TRUE, warns when more than one element is returned from x after simplification.

na.rm

Logical if TRUE individual NA elements will be removed before simplification.

ignore.case

Logical should character string comparisons ignore case. A FALSE argument could return "FOO; Foo; foo" while a TRUE argument would only return "FOO".

sort

Logical should the final values be sorted before return.

null.return

Value to be returned if na.rm = TRUE and non-NA values do not exist. By default NA will be returned for null return even if na.rm = TRUE, set this value to change this behavior.

Value

delimiter separated character string.


dkrozelle/toolboxR documentation built on May 15, 2019, 9:13 a.m.