SCM

SCM Repository

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

Diff of /pkg/tests/simple.R

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

revision 508, Fri Feb 4 18:22:28 2005 UTC revision 509, Fri Feb 4 23:34:01 2005 UTC
# Line 1  Line 1 
1  library(Matrix)  library(Matrix)
2    
3    set.seed(123)
4  mm <- Matrix(rnorm(500 * 150), nc = 150)  mm <- Matrix(rnorm(500 * 150), nc = 150)
5  xpx <- crossprod(mm)  stopifnot(validObject(mm))
6  validObject(mm)  xpx <- crossprod(mm)# alters mm !
7  validObject(xpx)  stopifnot(validObject(mm))
8    stopifnot(validObject(xpx))
9  str(mm)  str(mm)
10  str(xpx)  str(xpx)
11  xpy <- crossprod(mm, rnorm(500))  xpy <- crossprod(mm, rnorm(500))
12  res <- solve(xpx, xpy)  res <- solve(xpx, xpy)
13  str(xpx)  str(xpx)#
14  validObject(xpx)  stopifnot(validObject(xpx))
15  q("no")  
16    proc.time()

Legend:
Removed from v.508  
changed lines
  Added in v.509

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