中使用不同的行和列創建一組數據,也許有人可以幫助我。我在R中計算了不同的結果,現在我正試圖在一個txt中合併這些結果。數據。但是,不知何故,我無法創建一個數據文件,我可以對所有內容進行概述。如何在R
一個數據幀被稱爲 「min.temp」 與13行和3列(ID,日期和值)
id Date Temperature
1. 1967-04-25 -3.086980
2. 1969-04-20 -4.489397
3. 1972-04-26 -5.587154
4. 1976-04-29 -5.684246
5. 1976-04-30 -5.297752
6. 1977-04-20 -3.615099
7. 1981-04-21 -3.672259
8. 1981-04-24 -3.860317
9. 1991-04-20 -4.021680
10. 1991-04-21 -6.366689
11. 1991-04-22 -4.785906
12. 1997-04-21 -4.989829
13. 1997-04-22 -4.447067
和其他2個值 「aver.temp」 和 「max.temp」 只有1每行2列:
Average temperature: 10
Maximum temperature: 25
我試圖合併所有信息列表,但它在某種程度上破壞了我的列表,當我嘗試整合所有的人。我的目標是獲得一個名爲temperature.txt的txt.file,我可以在其中爲aver.temp和max.temp分開行,然後由其餘的行跟蹤。最後,它應該看起來像這樣。
Average temperature: 10
Maximum temperature: 25
id. Date Temperature
1. 1967-04-25 -3.086980
2. 1969-04-20 -4.489397
3. 1972-04-26 -5.587154
4. 1976-04-29 -5.684246
5. 1976-04-30 -5.297752
6. 1977-04-20 -3.615099
7. 1981-04-21 -3.672259
8. 1981-04-24 -3.860317
9. 1991-04-20 -4.021680
10. 1991-04-21 -6.366689
11. 1991-04-22 -4.785906
12. 1997-04-21 -4.989829
13. 1997-04-22 -4.447067
任何人都可以幫忙。
不是在這個問題中找到問號。 :( –
'?cat',''write.table'。你會想要使用'append = TRUE'。另請參閱'?capture.output'和'?sink' – GSee