substrsplit: Extract Common Name from variables

View source: R/toolbox.R

substrsplitR Documentation

Extract Common Name from variables

Description

Help mro variables extract common name out

Usage

substrsplit(obj, split_string = "")

Arguments

obj

It can be a vector or data frame, however, substrsplit is usually used in the iNZightMR function.

split_string

Specification of a string to allow splits on (e.g., use " " to only allow splitting at words).

Value

A list with common character and unique variable name respectively

Examples

substrsplit(c("varx", "vary", "varz"))

strings <- c("Do you like eating eggs?", "Do you like elephants?" , "Do you like elections?")
substrsplit(strings)
substrsplit(strings, split_string = " ")

iNZightVIT/iNZightMR documentation built on Feb. 3, 2024, 4:42 p.m.