The data frame I am working with:
head(ossub3)
date---------|os5 | os6 | os7| os8 | _ _Year| Month|Day|Hour|Minutes
11/15/2015|10.06|16.94|10.63|12.94 |2015|11|15| 12|08
I have all of the time units separated into columns. I would like one datetime column in R. I have tried the solutions on R tick data : merging date and time into a single object and on Strip the date and keep the time because when I try to
#Combine Date
ossub3$Date<-as.POSIXlt(paste(ossub3$Year, ossub3$Month, ossub3$Day, sep="-"),
tz = "US/Central", format = "%Y-%m-%d")
#Create new column called Time which concatenates Hour, Minute as a POSIXlt
ossub3$sec=rep(00,nrow(ossub3))
ossub3$Time<-as.POSIXlt(paste(ossub3$Hour, ossub3$Minute,ossub3$sec, sep=":"),
tz = "US/Central", format = "%H:%M")
I get today's date in my time so I can't combine it with the date. What is going on here?