search for: intakedate_c

Displaying 1 result from an estimated 1 matches for "intakedate_c".

Did you mean: intakedate_d
2012 Jul 11
3
unable to subtract dates in R
...akeDS$DOB <- as.Date(intakeDS$DOB, "%Y%m%d") > > # Make IntakeDate a date variable, by first converting it from numeric to character then from character to date > #intakeDS$IntakeDate <- as.character(intakeDS$IntakeDate) > intakeDS$IntakeDate_d <- as.Date(intakeDS$IntakeDate_c, "%Y%m%d") > > intakeDS$intake_age <- intakeDS$DOB - intakeDS$IntakeDate_d > intakeDS$intake_age Time differences in days [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA...