1

I have quite a large file, For simplicity say it has 5 columns and 100 rows.

The width of each column is 8 characters long. The eight characters are either numerals, text or tab space.

For example: (this without the '|' character)

|Header 1|Header 2|Header 3|Header 4|Header 5|
|0.123456|A word\t|   word |etcetcet|Lastone |
...

where \t is a tab character which fills in the remaining characters of the column

I want to bring this file into R as a data frame. Tell me, what are my options

I currently receive this error:

> test<-read.table(base, header = T)
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  : 
  line 1 did not have 6 elements
In addition: Warning message:
In read.table(base, header = T) :
  incomplete final line found by readTableHeader on 'test.txt'
aeongrail
  • 1,155
  • 1
  • 11
  • 26

0 Answers0