search for: lubiridate

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

2012 Jul 11
3
unable to subtract dates in R
Hi, I wanted to calculate the age of people in my dataset by subtracting the individual's date of birth from their intake into a program. After several hours, searches of help archives, and the downloading of lubiridate, I have had no luck with this. Below is the code I used. > intakeDS$DOB <- as.character(intakeDS$DOB) > intakeDS$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 dat...