Вот базовое решение R, использующее gregexpr()
+ lengths()
+ subset()
:
dfout <- subset(df,lengths(gregexpr("[[:alpha:]]+",df$text))>2)
, такое что
> dfout
id text
1 1 my text here
2 2 another the here but different
DATA
df <- structure(list(id = c(1, 2, 3), text = structure(c(2L, 1L, 3L
), .Label = c("another the here but different", "my text here",
"no text"), class = "factor")), class = "data.frame", row.names = c(NA,
-3L))