Skip to content
Prev 68503 / 398506 Next

How to override coerion error in 'scan'

Uwe,

Thanks. I did find something in the archives about using a custom
colClass of 'num' with read.csv and using setAs to define a character ->
num function. From the read.table code this appears to force 'scan' to
read it as character and then convert it later using 'as'.  I'm not sure
if there is any advantage in this approach to just reading it using a
colClass of 'character' and then converting it myself afterward (?)

--Rich

Richard Kittler 
AMD TDG
408-749-4099

-----Original Message-----
From: Uwe Ligges [mailto:ligges at statistik.uni-dortmund.de] 
Sent: Saturday, April 23, 2005 6:50 AM
To: Kittler, Richard
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] How to override coerion error in 'scan'
Kittler, Richard wrote:

            
I think you have to read it in as character - or write your own C-level 
facility...

Uwe Ligges