On 1/11/2012 11:07 PM, Paul Miller wrote: > Hello Everyone, > > I have a question about how best to check dates for entry errors.
It depends on the study. 1. Simple: use as.Date on the data, and find resultant missing values. You might have to add a format to the as.Date call: if I use as.Date("2001-02-29", format="%Y-%m-%d") I get an NA as desired (no Feb 29th that year); without it a message that the function can't guess the right format. 2. Better: with data set checks. Say that I have dates of birth, study enrollment, study events (lab tests), and termination. Age at entry within the study eligibity criteria All study events happen between erollment and termination Termination after enrollment etc ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.