Is there a way to filter rows that start with "*" or "#" for instance?
x <- c("*aa", "#aa", "aa")
y <- c(10, 20, 30)
df = data.frame(x, y)
I tried the following codes but I', getting "[1] x y
<0 rows> (or 0-length row.names)"
df %>% filter(!grepl("^*", x))
df %>% slice(grep("^*", x, invert = TRUE))
Thanks