read.table has a limit for length of each element of type character. While scan do not. if a file contain something like this: 001001000010100101010001000000100000011000101110000010010111000000100001011011011111000000110100100110100100 It's better to use data - scan(file = file ...