[問題] 如何將兩變數用/合併
各位高手大家好!
[軟體熟悉度]:
入門(寫過其他程式,只是對語法不熟悉)
[問題描述]
主要是手邊的data要作格式轉換
例如
id x1_1 x1_2 x2_1 x2_2 x3_1 x3_2 x4_1 x4_2
1 1 2 1 1 2 2 1 2
2 1 1 2 1 1 2 2 2
3 1 1 1 2 1 1 2 1
...
500 1 1 1 1 2 2 2 2
格式想轉變成
id x1 x2 x3 x4
1 1/2 1/1 2/2 1/2
2 1/1 2/1 1/2 2/2
3 1/1 1/2 1/1 2/1
...
500 1/1 1/1 2/2 2/2
以上,小弟在此先謝謝各位高手
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 211.76.175.169
※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1426589397.A.1FA.html
→
03/17 19:09, , 1F
03/17 19:09, 1F
→
03/17 19:09, , 2F
03/17 19:09, 2F
→
03/17 19:09, , 3F
03/17 19:09, 3F
→
03/17 19:10, , 4F
03/17 19:10, 4F
→
03/17 19:11, , 5F
03/17 19:11, 5F
→
03/17 19:11, , 6F
03/17 19:11, 6F
→
03/17 19:11, , 7F
03/17 19:11, 7F
→
03/17 19:12, , 8F
03/17 19:12, 8F
→
03/17 19:12, , 9F
03/17 19:12, 9F
→
03/17 19:13, , 10F
03/17 19:13, 10F
→
03/17 19:13, , 11F
03/17 19:13, 11F
→
03/17 19:14, , 12F
03/17 19:14, 12F
→
03/17 19:15, , 13F
03/17 19:15, 13F
→
03/17 19:24, , 14F
03/17 19:24, 14F
→
03/17 19:33, , 15F
03/17 19:33, 15F
→
03/17 19:33, , 16F
03/17 19:33, 16F
推
03/17 20:41, , 17F
03/17 20:41, 17F
→
03/18 08:53, , 18F
03/18 08:53, 18F
R_Language 近期熱門文章
PTT數位生活區 即時熱門文章