str_select | R Documentation |
Select parts of a string: before, after or between patterns.
str_select(string, after = NULL, before = NULL)
string |
A character vector |
after |
A character single value (default = NULL), that will be the pattern to select after |
before |
A character single value (default = NULL), that will be the pattern to select before |
A character vector.
string <- "begin STRING1 TARGET STRING2 end"
#Select a string, before a pattern
str_select(string,before = "STRING2")
#Select a string, after a pattern
str_select(string,after = "STRING1")
#Select a string, between two patterns
str_select(string,"STRING1","STRING2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.