0

Alpha 0.000 1.000 2.000 3.000 3.000
Beta 1.000 0.000 2.000 3.000 3.000
Gamma 2.000 2.000 0.000 3.000 3.000
Delta 3.000 3.000 3.000 0.000 1.000
Epsilon 3.000 3.000 3.000 1.000 0.000

Usually, we can store the matrix in txt using write.table() in R. But it takes a very long time to store a matrix with 40000 rows and columns. Is there any more efficient way to store it?

Nothing
  • 147
  • 2
  • 2
    The [`vroom`](https://vroom.r-lib.org/) package is a lot faster than `read.table`. That way you can probably stick to texte files. I would also expect that it is faster when you save your data as R object with `saveRDS()`. – Jan Nov 13 '21 at 08:37
  • 2
    There are some benchmarks in the following link indicating that fwrite from data.table is fast and writes ordinary text (rather than binary). https://stackoverflow.com/questions/10505605/speeding-up-the-performance-of-write-table – G. Grothendieck Nov 13 '21 at 12:56

0 Answers0