[R] Help with reading data

AlessandroSemeria@cramont.it AlessandroSemeria at cramont.it
Mon Mar 17 12:47:22 CET 2003

'The bizarre thing is this error comes from using read.table'
Not bizarre, read.table is a R-function  built with the R-function scan 
(you can look  the code simply  by command read.table at the R-prompt).
 'Error in scan("tree.dat") : "scan" expected a real, got "<!DOCTYPE"'
Obviously read.table is not able to read every data file (please look  at 
the help for read.table and at doc/Manual/R-data.pdf).
"DOCTYPE" is something by MS-Word file, instead to make use of scan (more 
fast) or read.table you need 
a flat ASCII file (i.e., trivial, you make a data sheet with some 
spreadsheet, Excell, and save it as separeted by tab .txt)



Alessandro Semeria 
Models and Simulations Laboratory
The Environment Research Center - Montecatini (Edison Group), 
Via Ciro Menotti 48,
48023 Marina di Ravenna (RA), Italy
Tel. +39 544 536811
Fax. +39 544 538663
E-mail: asemeria at cramont.it

More information about the R-help mailing list