[英]R chart in Kaggle
我在 Kaggle 中使用 R 編寫了以下代碼,但輸出錯誤,我再次安裝包 tidy verse 和庫 ggplot2,仍然顯示錯誤。 希望能在這里找到解決方法,謝謝!
rides_hour %>%
ggplot(data = rides_hour)+
geom_bar(mapping = aes(x = time, y = ride_count, fill = member_casual))
Error in ggplot(., data = rides_hour): object 'rides_hour' not found
Traceback:
1. rides_hour %>% ggplot(data = rides_hour)
2. ggplot(., data = rides_hour)
rides_hour 必須是一個 data.frame。 如果您使用的是data = rides_hour
,則無需使用rides_hour %>% ggplot...
。
相反,使用ggplot(data = rides_hour) + geom_bar(mapping = aes(x = time, y = ride_count, fill = member_casual))
。
理想的做法是與我們分享您正在使用的數據。 ;)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.