[R] strptime command in R

morozov morozov at uclink.berkeley.edu
Tue Oct 28 21:04:51 CET 2003


Hello all:

I have a column of times in format

   x
"16:30:00"
"16:30:03"
"16:59:00"
etc

which I need to convert into time variables and do some operations on.

I do the command y<-strptime(x,"%H:%M:%S"). This executes almost istantly (for 
a column x of length 1000 in Windows, but in Unix, where I run my production 
jobs, this takes over 4 minutes. I know that generally my Unix box is much 
more powerfull than my Win machine, and R runs generally faster on Unix, but 
this particular command is very very slow. Why is that? How can I speed that 
up without having to parse the strings by hand?

Thank you very much,
Vlad.




More information about the R-help mailing list