-1
library(ggplot2)
library(dplyr)
library(tidyr)
NEI_baltimore$year.type<-paste(NEI_baltimore$year,NEI_baltimore$type,sep = ".")
baltimore_sums<-aggregate(NEI_baltimore$Emissions,by=NEI_baltimore["year.type"],FUN=sum)
separate(data = baltimore_sums,col = year.type,into=c("year","type"),sep = ".")
我已經使用下面的代碼來分割已粘貼的列以獲取該粘貼列中的聚合函數。單獨顯示錯誤的函數
我收到警告,並沒有值在分裂列
Warning message:
Too many values at 16 locations: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
請正確格式化您的代碼。這是不可讀的。閱讀幫助。 – Bhas