[R] Help with reading data

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Sat Mar 15 04:32:38 CET 2003

On Fri, 14 Mar 2003, Nirvan Sunderam wrote:

> everytime i try to read in data i get the following error:
> Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
>         line 3 did not have 5 elements
> it was my understanding it wasn't necessary to specifiy all defaults. The bizarre thing is this error comes from using read.table.

> When I use scan I get the following error:
> Error in scan("tree.dat") : "scan" expected a real, got "<!DOCTYPE"

You appear to be trying to read an HTML (or perhaps XML or SGML) file.  
That's unlikely to be in any of the formats R can read.  Have you
downloaded this from the web and saved in the wrong format?

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

More information about the R-help mailing list