I got the data that consists exact time, minute, and second point. But I cannot use it directly because :
For example, '5559' in the data means '00 hour 55 min 59 sec',
'0' for '00 hour 00 min 00 sec',
while '314' for '00 hour 03 min 14 sec'.
Regarding data structure, there are several columns and this time data is one of them.
And this is integer form.
Since I have to deal with the data at once, a data transformation into integrated form is required.
And I am about to use 6 digit form of HHMMSS, and I think the originally it was constructed like '005559', '000000', '000314', but lost 0s in the process of importing files into R, because typically 0 can't come first.
So my question is this : Which function or libraries do I have to use to transform these data into 6-digit code?
I would try to read in the data in a way that the leading zeros are not lost. It would then be simple to parse the six digits into hours, minutes and seconds. For example, I made a csv file with this content:
If I read it in with the default settings of the read.csv function, the leading zeros are dropped. If I set the class of the Time column to character, the leading zeros are preserved. Can you do something similar with your data?
I faced on the different problem. At first I asked you guys 'how to read files with preserving leading zeros', but while I was doing further I had to figure out 'how to convert the figures into the form I wanted', for some reason.
If I saw the answer quicker I wouldn't have taken a detour...thank you. I'll do like that later.
But what I wonder is, that 'colclasses' works in 'fread'? Because I usually use fread instead of read.csv.