鄉親有條件更新,我有一個小時的溫度數據這樣數據框中
Lines <- "Date,Outdoor,Indoor
01/01 01:00:00,24.5,21.3
01/01 02:00:00,24.3,21.1
01/01 03:00:00,24.1,21.1
01/01 04:00:00,24.1,20.9
01/01 05:00:00,25.,21.
01/01 06:00:00,26.,21.
01/01 07:00:00,26.6,22.3
01/01 08:00:00,28.,24.
01/01 09:00:00,28.9,26.5
01/01 10:00:00,29.4,29
01/01 11:00:00,30.,32.
01/01 12:00:00,33.,35.
01/01 13:00:00,33.4,36
01/01 14:00:00,35.8,38
01/01 15:00:00,32.3,37
01/01 16:00:00,30.,34.
01/01 17:00:00,29.,33.
01/01 18:00:00,28.,32.
01/01 19:00:00,26.3,30
01/01 20:00:00,26.,28.
01/01 21:00:00,25.9,25
01/01 22:00:00,25.8,21.3
01/01 23:00:00,25.6,21.4
01/01 24:00:00,25.5,21.5
01/02 01:00:00,25.4,21.6
01/02 02:00:00,25.3,21.8"
,我需要創建另一個柱,上面寫着1,如果室內是至少1度比室外高。
我想:
但上面不起作用。任何建議?
請把重複的例子,並嘗試使用標準的日期格式(01-24是不是標準,對吧?) – aL3xa 2011-04-05 01:08:27
@ aL3xa:呃... 01-24是我以前的問題,關於如何在R中將其更改爲00-23。我得到了答案,但我忘了更新這個數據集。感謝您的提醒。 – ery 2011-04-05 01:20:17
嘿,np!一旦完成,使用'dput'來編寫R對象的ASCII表示。 – aL3xa 2011-04-05 01:25:47