splitCol {handyFunctions}R Documentation

Return specific-indexed vector according to given delimitator/separator by splitting one col in data.frame

Description

Return specific-indexed vector according to given delimitator/separator by splitting one col in data.frame

Usage

splitCol(data, col = FALSE, sep, index, fixed = TRUE)

Arguments

data

vector or data.frame input

col

the col names or indexes if data.frame input

sep

separation deliminator

index

the index of symbol which you want

fixed

logical. If TRUE match split exactly, otherwise use regular expressions, detailed info can be seen in strsplit.

Value

specific-indexed vector or factor

Examples

library(handyFunctions)
data(people)
splitCol(people, col = 1, sep = " ", index = 2)


[Package handyFunctions version 0.1.0 Index]