我想過濾一個數據幀中的天氣條件線雨天,清除...幷包含字符的列。過濾帶字符的列
` min1$Rainy <- filter(min1$Conditions == "Light Rain")`
我嘗試了上述代碼,但我面對這個錯誤:
Error in UseMethod("filter_") : no applicable method for 'filter_' applied to an object of class
"logical"
我該如何解決呢? 感謝您的時間。
我想過濾一個數據幀中的天氣條件線雨天,清除...幷包含字符的列。過濾帶字符的列
` min1$Rainy <- filter(min1$Conditions == "Light Rain")`
我嘗試了上述代碼,但我面對這個錯誤:
Error in UseMethod("filter_") : no applicable method for 'filter_' applied to an object of class
"logical"
我該如何解決呢? 感謝您的時間。
由於filter
是tidyverse
系列的一部分,它遵循標準tidyverse
接口。第一個參數需要是tbl_df
(數據框)。
歡迎來到StackOverflow!請閱讀關於[如何提出一個好問題](http://stackoverflow.com/help/how-to-ask)以及如何給出[可重現的示例]的信息(http://stackoverflow.com/questions/ 5963269 /如何對化妝一個偉大-R-重複性,例如/ 5963610)。這會讓其他人更容易幫助你。 – Jaap
'min1 $ Rainy'是一列,而'filter'產生一個數據幀,那麼如何將一個數據幀存儲到列中? – useR