Displaying 1 result from an estimated 1 matches for "datadtm".
Did you mean:
datadim
2012 Sep 27
1
Speeding up time conversion
...e dataset (27773536 records, the file is several GB) that contains a column of date / time entries in the format:
"2/1/2011 13:25:01"
I need to convert these to numeric values (ideally in seconds; the origin [e.g., 1970-01-01] is not important).
I am using:
as.numeric(strptime(DATA$DATADTM, "%m/%d/%Y %H:%M:%S"))
It takes 21 minutes to execute this step on a dual quad-core Mac with 12 GB RAM (it is appreciably slower on other Mac's including a new i5 iMac).
Are there other time formatting functions or strategies that would be faster?
Sample data:
TIMECOL <- rep(&qu...