SCM

SCM Repository

[matrix] Diff of /pkg/tests/indexing.R
ViewVC logotype

Diff of /pkg/tests/indexing.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2335, Fri Feb 13 14:09:22 2009 UTC revision 2341, Mon Mar 2 17:53:13 2009 UTC
# Line 589  Line 589 
589    
590  ## Large Matrix indexing / subassignment  ## Large Matrix indexing / subassignment
591  ## ------------------------------------- (from ex. by Imran Rashid)  ## ------------------------------------- (from ex. by Imran Rashid)
592  n <- 700000  n <- 7000000
593  m <-  10000  m <-  100000
594  nnz <- 20000  nnz <- 20000
595    
596  set.seed(12)  set.seed(12)
# Line 598  Line 598 
598                    j = sample(m, size=nnz, replace=TRUE))                    j = sample(m, size=nnz, replace=TRUE))
599  str(f)  str(f)
600  str(thisCol <-  f[,5000])# logi [....]  str(thisCol <-  f[,5000])# logi [....]
601  f[,5762] <- thisCol # no fine  f[,5762] <- thisCol # now fine
602    
603  fx <- sparseMatrix(i = sample(n, size=nnz, replace=TRUE),  fx <- sparseMatrix(i = sample(n, size=nnz, replace=TRUE),
604                     j = sample(m, size=nnz, replace=TRUE),                     j = sample(m, size=nnz, replace=TRUE),

Legend:
Removed from v.2335  
changed lines
  Added in v.2341

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge