textToColumns: Split character vector into data frame columns

Description Usage Arguments Value See Also Examples

View source: R/textToColumns.R

Description

textToColumns() splits a character vector into data frame columns based on a specified split value

Usage

1

Arguments

x

character vector, each element of which is to be split

split

character value to be used as the splitter

Value

A data frame of character vectors containing all of the split values. The number of columns will be the maximum number of splits found. Observations with less than the maximum number of splits will have NA values in columns for which they do not have a split. Column names will default to V1 - Vn, where n is the maximum number of splits found.

See Also

strsplit

Examples

1
2
x <- c("abc|123", "def|456")
textToColumns(x, "|")

dnegrey/miscTools documentation built on May 3, 2019, 2:57 p.m.