VAR1是一個列表整個列表元素:刪除含有某些字符串
var1 <- list(c("tall tree", "fruits", "star"),
c("tree tall", "pine tree", "tree pine", "black forest", "water"),
c("apple", "orange", "grapes"),
c("ancient pine tree", "all trees"))
我需要從包含該術語「鬆」列表中完全刪除那些元素。
期望的答案是一個列表:
[[1]]
[1] "tall tree" "fruits" "star"
[[2]]
[1] "apple" "orange" "grapes"
感謝