Hello,
Try
x[grepl("Yes", x) & x != ""]
Hope this helps,
Rui Barradas
Citando carol white via R-help :
> Hi, it might be trivial but is there any way to get the logical
> vector of the indices of a string in a vector? I thought that %in%
> would do but it doesn't. I also want to filter
Hi, it might be trivial but is there any way to get the logical vector of the
indices of a string in a vector? I thought that %in% would do but it doesn't. I
also want to filter the empty fields.
Here I want to extract the non-empty elements containing "Yes":x =c("Yes, fsd",
"", "No","","Yes, fj
2 matches
Mail list logo