Creating (and Accessing) a Sparse Matrix with NA default entries

前端 未结 2 1920
长发绾君心
长发绾君心 2020-12-01 08:40

After learning about the options for working with sparse matrices in R, I want to use the Matrix package to create a sparse matrix from the following data frame and have all

2条回答
  •  没有蜡笔的小新
    2020-12-01 08:56

    Yes, Thierry's answer is definitely true I can say as co-author of the 'Matrix' package...

    To your other question: Why is accessing "M" slower than "Y"? The main answer is that "M" is much much sparser than "Y" hence much smaller and -- depending on the sizes envolved and the RAM of your platform -- the access time is faster for much smaller objects, notably for indexing into them.

提交回复
热议问题