I have a data.frame something like this:
D = data.frame(a = c(NA,"2015-09-10"), b = c("2016-09-30",NA))
Here I'm not sure, whether this actually perfectly represents my data, because there are two columns of dates (date-time format, POSIXlt).
a b
1 <NA> 2016-09-30
2 2015-09-10 <NA>
Each column has entries/NA's, there are no double entries. I want to combine these two. So far I tried every version of paste()
or merge()
I am aware of (though my knowledge is restricted).
The question is very closely related to Combine two columns in R, still I cannot make it work, because rowMeans()
only works on numerics.