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: [email protected] _______________________________________________ datatable-help mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
