df45 = data.frame(
Tag = c(1,1,1,1,1,2,2,2,2,2),
clus = c("L1","L2","L3","L4","L5","L1","L2","L3","L4","L5"),
long = runif(1:10,1,2),
medium = runif(1:10,1,2),
short = runif(1:10,1,2),
urgent = runif(1:10,1,2))
这是我试图转动的数据。
这是预期的输出显示图像,开始使用我尝试下面的代码,但我无法达到所需的结果。
melt(df45 , id.var = "Tag")