R语言中 str_detect函数

 

str_detect函数属于tidyverse包中函数, 功能类似于grepl函数。

 

001、

str1 <- c("xx", "yy", "zz", "xx", "pp", "xx")
str1
grepl("xx", str1)
str_detect("xx", str1)

 

posted @ 2022-08-03 06:22  小鲨鱼2018  阅读(779)  评论(0编辑  收藏  举报