From ripley at stats.ox.ac.uk  Wed Sep  8 20:19:57 2004
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed Sep  8 20:20:03 2004
Subject: [Rd] A couple of issues with colClasses/setAs
In-Reply-To: <x24qm8r84e.fsf@biostat.ku.dk>
Message-ID: <Pine.LNX.4.44.0409081918180.25093-100000@gannet.stats>

On 8 Sep 2004, Peter Dalgaard wrote:

> Prof Brian Ripley <ripley@stats.ox.ac.uk> writes:
> 
> > > etc?  Or perhaps it is better with a catchall "Date-fmt", i.e., e.g.,
> > > "Date-%Y%m%d"? That'd be fairly easy to code:
> > > 
> > > else if (length(grep("^Date-",colClasses[i])))  
> > >         as.Date(data[[i]], sub("^Date-(.*)$","\\1", colClasses[i]))
> > > 
> > > although perhaps not so easy to document concisely.
> > 
> > Is it really so hard to convert such columns from character afterwards?
> 
> Couldn't that be said for all of the classes?

Yes, which is why the original colClasses only dealt with those that could 
avoid conversion (where there can be large time and space benefits).

-- 
Brian D. Ripley,                  ripley@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


[Rd] A couple of issues with colClasses/setAs
Prof Brian Ripley