想要根据常委+省负责人+拉排期省份、week这几个变量,把预报排期和实际排期转换为宽数据。
我现在把预报数据转为宽数据没问题,
- com_wide<-dcast(com,常委+省负责人+拉排期省份~week,value.var = "预报排期")
但是把预报排期和实际排期一起转为宽数据,报错,语句这么写的:
- com_wide<-dcast(com,常委+省负责人+拉排期省份~week,value.var = c("预报排期","实际排期"))
报的错是:
Error in .subset2(x, i, exact = exact) : subscript out of bounds
In addition: Warning message:
In if (!(value.var %in% names(data))) { :
the condition has length > 1 and only the first element will be used


雷达卡





京公网安备 11010802022788号







