Reputation: 7
I have a .txt file in which the second column represents the measuring time in seconds (starting date of measurements is 04/01/15) during 367 days (end date of measurements is 04/01/16). The third and so on are measured variables.
In my analysis I need to have this second column in Julian days (when dealing with this type of date I usually use as "origin" 01/01/1992) in order to assess with other variables in other files that have already the date in Julian time. I could also use the calendar date instead if I had it!
Example of the file:
(First day)
091.00000 0.00 102.63 16.79 81.40 5.07 144.20 0.00
091.00069 60.00 102.63 16.80 81.30 5.86 136.00 0.00
091.00139 120.00 102.63 16.75 81.20 2.46 144.20 0.00
(...)
091.99931 86340.00 102.53 17.09 82.60 1.60 117.00 0.00
(Second day)
092.00000 0.00 102.53 16.96 82.60 1.56 115.00 0.00
092.00069 60.00 102.53 16.87 82.90 1.38 114.70 0.00
092.00139 120.00 102.53 17.01 82.90 1.13 110.30 0.00
(...)
092.99931 86340.00 102.44 17.38 87.10 1.75 116.00 0.00
This happens for all days during the entire 367 days (corresponding to a total of 526970 measurements) and I have this all together in one file. There might be missing data recording, so I can use missing values (NA) in those gaps.
I'm using R.
Upvotes: 0
Views: 115
Reputation: 18487
The second column seems to be the number of seconds since the current day started. 24 hours / day * 3600 seconds per hour is 86400 seconds per day. So SecondColumn/86400
gives the decimals of the Julian date. The second columns doesn't hold information on the date itself.
Upvotes: 0