-1
私はすべての行がリストであるデータフレームに列を持っています。排除によって列から特定の値を削除することは可能ですか?除外によってリストから要素を削除します
私はベクトルのために、以下のアプローチを試してみました:
yelp_asian_final %>% mutate(categories = ifelse(categories != "Thai" | categories != "Vietnamese", NULL,
categories))
しかし、私は次のエラー得た:最初の4行の
Error in mutate_impl(.data, dots) :
Evaluation error: replacement has length zero.
In addition: Warning message:
In rep(yes, length.out = length(ans)) :
'x' is NULL so the result will be NULL
例:ここで
> dput(head(yelp_asian_final$categories,4)
+)
list(c("Thai", "Restaurants"), c("Vietnamese", "Restaurants"),
c("Indian", "Restaurants"), c("Restaurants", "Japanese",
"Sushi Bars"))
[偉大R再現性の例を作るには?](http://stackoverflow.com/questions/5963269) – Sotos