Delete rows containing specific strings in R

前端 未结 6 1610
暖寄归人
暖寄归人 2020-11-27 11:34

I would like to exclude lines containing a string \"REVERSE\", but my lines do not match exactly with the word, just contain it.

My input data frame:



        
6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-27 12:02

    You can use stri_detect_fixed function from stringi package

    stri_detect_fixed(c("REVERSE223","GENJJS"),"REVERSE")
    [1]  TRUE FALSE
    

提交回复
热议问题