[R] sparse matrix, rnorm, malloc

2006-06-10 Thread g l
Hi, I'm Sorry for any cross-posting. I've reviewed the archives and could not find an exact answer to my question below. I'm trying to generate very large sparse matrices ( 1% non-zero entries per row). I have a sparse matrix function below which works well until the row/col count exceeds

Re: [R] sparse matrix, rnorm, malloc

2006-06-10 Thread roger koenker
You need to look at the packages specifically designed for sparse matrices: SparseM and Matrix. url:www.econ.uiuc.edu/~rogerRoger Koenker email [EMAIL PROTECTED] Department of Economics vox:217-333-4558University of

Re: [R] sparse matrix, rnorm, malloc

2006-06-10 Thread Prof Brian Ripley
On Sat, 10 Jun 2006, g l wrote: Hi, I'm Sorry for any cross-posting. I've reviewed the archives and could not find an exact answer to my question below. I'm trying to generate very large sparse matrices ( 1% non-zero entries per row). I have a sparse matrix function below which works well

Re: [R] sparse matrix, rnorm, malloc

2006-06-10 Thread roger koenker
As an example of how one might do this sort of thing in SparseM ignoring the rounding aspect... require(SparseM) require(msm) #for rtnorm sm - function(dim,rnd,q){ n - rbinom(1, dim * dim, 2 * pnorm(q) - 1) ia - sample(dim,n,replace = TRUE) ja - sample(dim,n,replace =