View source: R/ReformatDataframe.R
splitCol | R Documentation |
Return specific-indexed vector according to given delimitator/separator by splitting one col in data.frame
splitCol(data, col = FALSE, sep, index, fixed = TRUE)
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. |
specific-indexed vector or factor
library(handyFunctions) data(people) splitCol(people, col = 1, sep = " ", index = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.