I have a column within a dataframe that contains date information that is stored in multiple forms e.g.
dob <- c("18/02/1983","36782","01/11,1999 11:55",
"Dead 12/12/2001","Alive 03/07/1985")
I'd like to convert all of these into POSIXlt
dates of the format "%d/%m/%Y"
, with no time info, and no "Dead"
or "Alive"
prefixing them.
All previous solutions to similar problems involve only two possible formats, that I can tell, whereas I have more, and also I have the problem of converting the 5 digit number format dates (which I think are numeric dates with origin 1970-01-01 from Excel) also. I'm using R-3.1.2. Any help would be gratefully received!