strs_split | R Documentation |
strs_split
splits each element of a character vector into substrings based
on a separator. It is similar to Python's str.split()
method.
strs_split(string, sep = " ", maxsplit = -1L)
string |
A character vector to split. |
sep |
The separator on which to split the string. |
maxsplit |
The maximum number of splits to perform. If -1, all possible splits are performed. |
A list of character vectors, with each vector containing the split
substrings from the corresponding element of string
.
Python str.split() documentation
strs_split("hello world", " ")
strs_split("one,two,three", ",", maxsplit = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.