[R] How to store a triangular matrix

David Winsemius dwinsemius at comcast.net
Fri May 13 17:00:39 CEST 2011


On May 13, 2011, at 10:52 AM, Estefania Ruiz Vargas wrote:

> Hello, I want to create a triangular matrix and only keep the lower  
> triangle entries without having to allocate memory for the whole  
> matrix, is there any way I can do something like
> A<-matrix(data, nrow=50)
>  but for a triangular matrix?

The `Matrix` package implements sparse matrices and has several  
triangular classes.

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list