I have a big data.frame and located some missing values respectively there are some wrong formats which I guess that strptime
isn't able to detect:
D = data.frame(a = c("2007-06-22","2007-05-22","3032016"), b = c("2007-06-23","2007-06-24", "2007-06-25"))
a b
1 2007-06-22 2007-06-23
2 2007-05-22 2007-06-24
3 3032016 2007-06-25
How can I input a specific date-format into that cell? Something like:
D[3,1] <- "2016-03-30"
Edit: This question is indepdent of the initial format. Even for a set of:
a b
1 2007-06-22 2007-06-23
2 2007-05-22 2007-06-24
3 123 2007-06-25
or
a b
1 2007-06-22 2007-06-23
2 2007-05-22 2007-06-24
3 NA 2007-06-25
I would like to enter some new date-time data. It might be an easy question, nonetheless, I am not aware of the correct command.
Thanks.