I am trying to import a data set from a .dat
file off the internet using the read.table
command. I usually have no issues when the file is formatted, for example:
A B
1 2
3 4
But this data set is formatted
A B A B
1 2 3 4
5 6 7 8
(You can find the data set I'm having issues with here: https://www2.isye.gatech.edu/~jeffwu/book/data/BrainandBodyWeight.dat)
My current line of code is:
Data2 = read.table("https://www2.isye.gatech.edu/~jeffwu/book/data/BrainandBodyWeight.dat", header = TRUE)
The error I'm getting is:
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : line 1 did not have 12 elements