for (i in 1:nrow(cases)){
row <- cases[i,]
row$O=as.numeric(row$O)
x=aggregate(cases$O, by=list(cases$`Date`), FUN=sum)
y=merge(row,x,by.x='Date',by.y='Group.1')
row[, 'O'] <- y[, 'x']
row[,'x']<-NULL
row_list[[length(row_list) +1]] <- row
}
抛出此错误:FUN(X [[i]],...)中的错误: 仅在具有所有数字变量的数据框中定义