[R] generating lower triangular matrix
Gabor Csardi
csardi at rmki.kfki.hu
Fri Jul 6 13:26:14 CEST 2007
You might want to check lower.tri. Also, keep in mind that a matrix
in R is just a vector with a 'dim' attribute. The elements are stored
columnwise.
Gabor
On Thu, Jul 05, 2007 at 06:53:45PM -0400, Aydemir, Zava (FID) wrote:
> Hi,
>
> I would like to generate below triangular matrix for some a.
>
> 0
> 0
> 0
> 0
[...]
>
> What's an efficient way to do this? (this matrix being KxK, K very
> large)
>
> Thanks
>
> Zava
> --------------------------------------------------------
>
> This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Csardi Gabor <csardi at rmki.kfki.hu> MTA RMKI, ELTE TTK
More information about the R-help
mailing list