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 2192, Thu May 1 08:21:47 2008 UTC revision 2198, Mon Jun 2 16:07:31 2008 UTC
# Line 5  Line 5 
5  source(system.file("test-tools.R", package = "Matrix"))# identical3() etc  source(system.file("test-tools.R", package = "Matrix"))# identical3() etc
6    
7  if(interactive()) {  if(interactive()) {
8      options(error = recover)      options(error = recover, warn = 1)
9  } else options(verbose = TRUE)# to show message()s  } else options(verbose = TRUE, warn = 1)
10    
11  ### Dense Matrices  ### Dense Matrices
12    
# Line 220  Line 220 
220            identical(m0[,1], c(1,0,0,0,0)))            identical(m0[,1], c(1,0,0,0,0)))
221  ### Diagonal -- Sparse:  ### Diagonal -- Sparse:
222  (m1 <- as(m0, "sparseMatrix"))  # dtTMatrix  (m1 <- as(m0, "sparseMatrix"))  # dtTMatrix
223  (m2 <- as(m0, "CsparseMatrix")) # dtCMatrix (with an irrelevant warning)  (m2 <- as(m0, "CsparseMatrix")) # dtCMatrix
224  m1g <- as(m1, "generalMatrix")  m1g <- as(m1, "generalMatrix")
225  stopifnot(is(m1g, "dgTMatrix"))  stopifnot(is(m1g, "dgTMatrix"))
226  assert.EQ.mat(m2[1:3,],    diag(5)[1:3,])  assert.EQ.mat(m2[1:3,],    diag(5)[1:3,])

Legend:
Removed from v.2192  
changed lines
  Added in v.2198

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