I have a few hundred data files, each comprising of a 3 line header and a single column of sampled data values. In the header there is are multiple fields including a time field which gives the time the file was created e.g. "Time=10:00:00.156"
, sampling time "Tsamp=0.1000"
and "TimeUnits=1.0000E-06"
(i.e. time interval between data values in file = 0.1 microSeconds). I want to use this information to create a vector of times for each of the acquired data values in the file.
How can I do this? I tried chron and zoo libraries and the differnt ts functions but couldn't do it. Any help would be sincerely appreciated.
I would like to be able to put this into a script so that I can process all the files automatically. what I would like to end up with is a data frame with two columns showing the concatenated times for all of the above files in column 1 and the concatenated measured values for all of the above files in column 2.
ATF v1.00 Date=23-01-2012;
Time=10:38:56.421000;
TracePoints=16384;
TSamp=0.100000;
TimeUnits=1.00000e-006;
AmpToVolts=1.0000;
TraceMaxVolts=0.10000;
PTime=0.00000;
STime=0.00000;
[TraceData]
4.82178e-004
-1.37329e-003
2.19116e-003
4.38843e-003
1.65405e-003
3.36304e-003
5.95093e-003
2.19116e-003
Again any help would be appreciated.