Description Usage Arguments Examples
View source: R/grab_first_word.R
Specify the end of the word using the splitter variable.
1 | grab_first_word(e, splitter = " ")
|
e |
A character element to split. |
splitter |
The character vector that delineates where the first word ends. |
1 2 3 4 5 6 7 8 | grab_first_word("some string but I just want the first word")
dplyr::starwars %>%
dplyr::select(name) %>%
dplyr::mutate(
first_name = purrr::map_chr(name, grab_first_word),
droid_first_name = purrr::map_chr(first_name, grab_first_word, splitter = "-")
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.