Description Usage Arguments Value Examples
View source: R/str_split_one.R
Split a string
1 | str_split_one(string, pattern, n = Inf)
|
string |
A character vector with, at most, one element. |
pattern |
The character to split on. |
n |
Some number for something. |
A character vector.
1 2 3 4 5 6 | x <- "alfa,bravo,charlie,delta"
str_split_one(x, pattern = ",")
str_split_one(x, pattern = ",", n = 2)
y <- "192.168.0.1"
str_split_one(y, pattern = stringr::fixed("."))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.