[R] additional error on read.table function

oliver wee islandboy1982 at yahoo.com
Sun Jan 29 17:34:12 CET 2006


hi,

thanks to the feedback of some people I was able to
solve my problem of reading data using the read.table
function by using the file.choose function inside the
method of the read.table function. 

Unfortunately, I encountered a new error message after
I chose my file.
After I unputted 
data = read.table(file.choose(), header = TRUE)

I got an error saying:

Error in scan(file = file, what = what, sep = sep,
quote = quote, dec = dec,  : 
        line 1 did not have 11 elements
In addition: Warning message:
incomplete final line found by readTableHeader on
'D:\Oliver\Professional\Studies\Time Series
Analysis\spdc2693.data.txt' 

my time series data looks like this...

------------
Standard and Poor's 500 Index closing values from 1926
to 1993.

  Date       Index
  260101     12.76
  260108     12.78
  260115     12.52
  260122     12.45
  260129     12.74
  260205     12.87
  260212     12.87
  260219     12.74
  260226     12.18
  260305     11.99
  260312     12.15
  260319     11.64
  260326     11.46
...
(and so on)
----------

Should I insert additional attributes besides header =
TRUE? 

thanks.




More information about the R-help mailing list