I am trying to figure out a problem I'm having with converting a date
column from factor to posixct. I have a script which I have run several times with no issue. When I read my .csv file, it has a date column which comes as a factor. But I convert it into POSIXct using as.POSIXct()
so I can create a plot and do some calculations.
Recently, I had to reinstall R. Now when I try to convert from factor to posixct, my dataframe length and size become zero. I have searched for a solution, but could not find a solution. Why would as.POSIXct()
erase my dataframe?
date Julian Hour MINUTE date1 v1
2004-04-25 116 18 0 2004-04-25 18:00 0.0000001
2004-04-25 116 18 30 2004-04-25 18:30 0.0000001
2004-04-25 116 19 0 2004-04-25 19:00 0.0000002
2004-04-25 116 19 30 2004-04-25 19:30 0.0000003
2004-04-25 116 21 0 2004-04-25 21:00 0.0000001