[R] Summary of Forcing variables types when using read.table
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Mon Jul 16 14:11:20 CEST 2001
On 11 Jul 2001, Peter Dalgaard BSA wrote:
> "David Kane <David Kane" <a296180 at mica.fmr.com> writes:
>
> > Thanks to Martyn Plummer and Vele Samak for taking the time to answer my
> > problem. scan certainly will do the trick. However, having taken a look at the
> > code for read.table, it seems to me that I might be able to add in a "what"
> > argument and then just pass it down to the call to scan. But that won't be
> > today's project . . .
>
> Wouldn't work. The scan inside read.table reads *everything* as
> character and type.convert converts the type afterwards. However, you
> could bypass the type.convert call...
Or use the as.is argument to do so? It does nothing useful for numeric
columns, so why not extend its meaning to leave the column alone, whatever
it started as?
--
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 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list