On Fri, 30 Sep 2005, sloan jones wrote:
I have used the RODBC package to read in data I have stored in an Access file. When I am using data from files other than ACCESS I have no problem using the survival package to work with dates; however, with the ACCESS data the dates are reading-in in the following format: "2004-02-11 Pacific Standard Time". How do I remove the "Pacific Standard Time" part in ACCESS or R so that I can coerce the data into a workable format? Any suggestions?
If this really is a character vector and not the result of printing a "Date" object, see ?strftime. But you haven't told us anything like enough to go on. As far as I know the survival package expects numeric values (e.g. of days or years) and not dates as implemented in R, except for survexp() which wants a different format, that of the 'dates' package (which it partially incorporates).
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595