[datatable-help] fread: skip

Gabor Grothendieck ggrothendieck at gmail.com
Sun May 12 17:42:15 CEST 2013


This makes the local time zone GMT:

Sys.setenv(TZ = "GMT")

and this switches back:

Sys.setenv(TZ = "")





On Sun, May 12, 2013 at 11:39 AM, Karl Ove Hufthammer <karl at huftis.org> wrote:
> su. den 12. 05. 2013 klokka 16.20 (+0100) skreiv Matthew Dowle:
>> For that I think all that needs to be done (now) is adding something
>> very similar to these few lines (from read.table) into fread at R
>> level
>> after the data has been read in :
>>
>>         if (colClasses[i] == "factor")
>>             as.factor(data[[i]])
>>         else if (colClasses[i] == "Date")
>>             as.Date(data[[i]])
>>         else if (colClasses[i] == "POSIXct")
>>             as.POSIXct(data[[i]])
>
> Any chance you could support the ‘tz’ attribute of ‘as.POSIXct’
> (as a global value for all datetimes would probably be sufficient)?
>
> By default, strings are interpreted as being in the locale timezone,
> which means that some apperently valid datetimes are invalid (because of
> DST), resulting in loss of information of the resulting POSIXct vectors.
>
> See the following ‘not-a-bug’ for an explanation of the problem:
>   https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14845
>
> --
> Karl Ove Hufthammer
> http://huftis.org/
> Jabber: karl at huftis.org
>
> _______________________________________________
> datatable-help mailing list
> datatable-help at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help



-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com


More information about the datatable-help mailing list