如何通过将行值转换为列值来编辑Excel表

时间:2017-02-03 09:17:46

标签: r database excel excel-2010 excel-2016

enter image description here

我上面的表格包含纬度和经度值,但纬度在列和列中。经度是排的,我希望列中列出并具有相应的值

1 个答案:

答案 0 :(得分:0)

你可以添加所需的输出吗? 我想你可以使用重塑包。

library(reshape)
df <- read.table("your_file")
result <- melt(df, id = c("name"))