我有以下数据
enter code here
x = c('012015','012015','070956','070956','074351')
y = c('011220','G20084','G20547','G20548','G70575')
df = as.data.frame(x)
df$y = y
我尝试了从tidyverse进行传播,但是它抛出错误“错误:行的标识符重复”
temp = df %>% spread(key = x, value = y)