2017-02-03 4 views
-1

enter image description here私は緯度と経度の値を含む表の上に持っているが、緯度が列に&経度ある

行であり、Iは賢明カラムおよびそれらの両方したい値対応する値

+0

あなたが探しているアクションは、unpivotと呼ばれています。すでにインターネット上にたくさんのヒントがあります。 –

+0

便利なポインタhttp://stackoverflow.com/questions/7980030/how-to-pivot-unpivot-cast-melt-data-frame、http://stackoverflow.com/questions/2185252/reshaping-data-frame -from-wide-to-long-format –

答えて

0

希望の出力を追加できますか? 私はreshapeパッケージを使用することができますね。

library(reshape) 
df <- read.table("your_file") 
result <- melt(df, id = c("name")) 
関連する問題