Hi!
Would like to initialize a huge matrix.csc (Pacakge SparseM) with all elements 0
and afterwards set a few alements nonzero.
The matrix which I like to allocate is so huge that I can not use
A - matrix(a,n1,p)
before:
A.csr - as.matrix.csc(A)
because I can not allocate such a huge matrix A.
A - as.matrix.csr(0,5,4)
A
An object of class matrix.csr
Slot ra:
[1] 0
Slot ja:
[1] 1
Slot ia:
[1] 1 2 2 2 2 2
Slot dimension:
[1] 5 4
A[3,4] - 3
A
An object of class matrix.csr
Slot ra:
[1] 0 3
Slot ja:
[1] 1 4
Slot ia:
[1] 1 2 2 3 3 3
Slot dimension:
[1] 5 4
as.matrix(A)
[,1] [,2]