1
我在含有時間柱上用24小時時鐘一個數據幀:爲什麼strftime的改變我的次R'
canopy_understory trap_no file_name date time temp light_intensity
<chr> <int> <chr> <dttm> <time> <dbl> <dbl>
1 c 11 trap11c_160314.txt1 16-01-09 14:00:00 35.542 41
2 c 11 trap11c_160314.txt2 16-01-09 15:00:00 28.953 4
3 c 11 trap11c_160314.txt3 16-01-09 16:00:00 27.468 1
爲了除去秒列我中的R在其上運行的代碼:
all_files_hobo$time <- strftime(all_files_hobo$time, format = "%H:%M")
我運行後這個代碼,我有以下的數據幀
canopy_understory trap_no file_name date time temp light_intensity
<chr> <int> <chr> <dttm> <chr> <dbl> <dbl>
1 c 11 trap11c_160314.txt1 16-01-09 06:00 35.542 41
2 c 11 trap11c_160314.txt2 16-01-09 07:00 28.953 4
3 c 11 trap11c_160314.txt3 16-01-09 08:00 27.468 1
正如你所看到的,秒都不見了,列已由更改,但時間也不同。這是有問題的。我可以只添加8每次,但恐怕有一些更陰險怎麼回事,並說事情會在不久的將來搞的一團糟。爲什麼strftime會改變我的時代?
閱讀的人我想它的一個時區的問題,但我仍然不知道如何解決這個問題。 – 5r9n
設置使用''strftime' – SymbolixAU
我怎麼設置時區,使之不會改變任何東西的tz'參數的時區? – 5r9n