str_begins | R Documentation |
helpful to combine with filter()
str_begins(x, pattern)
x |
character vector |
pattern |
substring that you want to detect |
x <- c("C22240098", "C22250098", "C22240189", "G1003260")
x %>% str_begins("G")
x %>% str_begins("C22")
library(tidyverse)
df <- tibble(src_code = x)
df %>% filter(src_code %>% str_begins("G"))
df %>% filter(src_code %>% str_begins("C22"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.