delete all rows that contain a string in R code example
Example 1: delete all rows that contain a string in R
library(dplyr)
df %>%
filter(!grepl('REVERSE', Name))
Example 2: delete all rows that contain a string in R
df[ grep("REVERSE", df$Name, invert = TRUE) , ]
Example 3: delete all rows that contain a string in R
library(stringr)
df %>%
filter(!str_detect(Name, 'REVERSE'))