R/main.R
mat2list.Rd
Transfer a matrix to a list
mat2list(z_int, nvec)
a vector with number of rows n.
an integer vector, specify the length of each component in the transferred list. n=sum(nvec).
n=sum(nvec)
return a list with each componnet matrix.
mat2list(matrix(1, nrow=3+5, ncol=2), nvec=c(3,5)) #> [[1]] #> [,1] [,2] #> [1,] 1 1 #> [2,] 1 1 #> [3,] 1 1 #> #> [[2]] #> [,1] [,2] #> [1,] 1 1 #> [2,] 1 1 #> [3,] 1 1 #> [4,] 1 1 #> [5,] 1 1 #>