I have a data frame that has day of the year, year, month, 12 hr time, and some energy data. I want to make the 12 hr formatted time data into hours of the day (1-24). The time is character class.
format(as.POSIXct(t, format = '%I %p'), format = "%H")
Where
t <- df$time
df$time== time in character class with following format:
"12 a.m." "3 p.m."
but after code I get all NA and no change in column.