strCommonUnique: Finds the common and unique elements in a character vector.

View source: R/strings.R

strCommonUniqueR Documentation

Finds the common and unique elements in a character vector.

Description

Function takes a character string as input and find the common and unique elements. Assumes that the common element is at start of string.

Usage

strCommonUnique(string)

Arguments

string

Character vector

Value

list of common and unique strings

Examples

test <- c("Q_1", "Q_2", "Q_3")
strCommonUnique(test)$common
strCommonUnique(test)$unique

andrie/surveydata documentation built on March 13, 2023, 2 a.m.