I have a text file which is a 1000 Row * 40001 Column table.
The first Column of the file is a string and the other columns are some float numbers, such as this:
A 2 3 4.54 .... 11.23
B 6 6 7 .... 23.45
I want to read this file into a matice but read.table seems not very efficient for large files, so I think scan may be the right tool for that?
However, scan can only accept numbers as input by default. If I want non-number as input, I need to change the what parameter. But as there’re 40000+ columns, I can’t assign the type of input for each input..
Does anyone know how to use it? Thanks!
You could use the
whatargument and specify a list of types (likecolClasses).