strsplit2 | R Documentation |
Strsplit when there are two layers of separators (sep1, sep2) and one needs to extract a collapsed vector of subitem j for all items i.
Takes in a character vector and outputs a list of "separated" items
strsplit2(x, sep1 = ",", sep2 = " ", j = 1)
x |
character vector |
sep1 |
character specifying first level separator (=',') |
sep2 |
character specifying second level separator (=' ') |
j |
integer specifying which subitem to keep (=1) |
vector of values for subitem j
Marcin Imielinski
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.