I've the data below:
> head(dataraw)
GMT_DATE GMT_TIME LATITUDE LONGITUDE
1: 5/5/2016 13:00:30 -2.156247 35.44368
2: 5/5/2016 14:00:24 -2.202152 35.44438
3: 5/6/2016 05:02:48 -2.144972 35.56301
4: 5/6/2016 06:00:30 -2.257708 35.46812
5: 5/6/2016 07:00:24 -2.427338 35.37436
6: 5/6/2016 08:00:59 -2.408157 35.34967
And I'm using the following code to merge columns GMT_DATE
and GMT_TIME
. Please find a sample of the output as well:
> dataraw$`Date & Time [Local]`<-as.POSIXct(paste(dataraw$GMT_DATE, dataraw$GMT_TIME), format="%m-%d-%y %H:%M:%S")
> head(dataraw)
GMT_DATE GMT_TIME LATITUDE LONGITUDE Date & Time [Local]
1: 5/5/2016 13:00:30 -2.156247 35.44368 <NA>
2: 5/5/2016 14:00:24 -2.202152 35.44438 <NA>
3: 5/6/2016 05:02:48 -2.144972 35.56301 <NA>
4: 5/6/2016 06:00:30 -2.257708 35.46812 <NA>
5: 5/6/2016 07:00:24 -2.427338 35.37436 <NA>
6: 5/6/2016 08:00:59 -2.408157 35.34967 <NA>
I used an answer from a different post but the code is not working for my data. Any ideas or what could I be doing wrong?
Any input is appreciated