knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(tidyverse)
data <- 
  data.frame(
    y = c('apple','banana','peach')
  )
# devtools::install_github('JiaxiangBU/add2prep')
library(add2prep)
data %>% 
  filter(regex_in(y,'app|ba'))
  # filter(stringr::str_subset(y %in% str_subset(y,'app|ba')))


JiaxiangBU/add2prep documentation built on May 5, 2019, 7:07 a.m.