老师们好,我的数据格式是这样的,
想要根据常委+省负责人+拉排期省份、week这几个变量,把预报排期和实际排期转换为宽数据。
我现在把预报数据转为宽数据没问题,
但是把预报排期和实际排期一起转为宽数据,报错,语句这么写的:
哪里不对呢?
报的错是:
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