[R] read.table issue

Santosh Srinivas santosh.srinivas at gmail.com
Sun Oct 10 04:05:46 CEST 2010


Dear R-Group,

I am getting this error message "incomplete final line found by
readTableHeader" in the code below.

It seems to me that the error message is because of quote in the text data.
Is there any easy way to handle this? Or should I do a substitute.


> tempTxt <- "100589;Canara Robeco Expo-Income
Plan;18.92;18.92;19.35;02-Apr-2007
+ "
> read.table(textConnection(tempTxt), sep=';')
      V1                             V2    V3    V4    V5          V6
1 100589 Canara Robeco Expo-Income Plan 18.92 18.92 19.35 02-Apr-2007
> tempTxt <- "103272;Canara Robeco Fortune '94;30.07;30.07;30.75;02-Apr-2007
+ "
> read.table(textConnection(tempTxt), sep=';')
Error in read.table(textConnection(tempTxt), sep = ";") : 
  incomplete final line found by readTableHeader on 'tempTxt'

Thanks,
Santosh



More information about the R-help mailing list