# SCM Repository

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

# Diff of /pkg/tests/indexing.R

revision 1362, Thu Aug 10 09:44:55 2006 UTC revision 1367, Sat Aug 12 17:33:07 2006 UTC
# Line 87  Line 87
87            identical3(mT[2,3], mC[2,3], 0),            identical3(mT[2,3], mC[2,3], 0),
88            identical(mT[], mT),            identical(mT[], mT),
89            ## TODO: identical4() with  m[c(3,7), 2:4] - fail because of 'dimnames'            ## TODO: identical4() with  m[c(3,7), 2:4] - fail because of 'dimnames'
90            identical3(as(mC[c(3,7), 2:4],"matrix"), mm[c(3,7), 2:4],            ## TODO: identical3() with as(mC[c(3,7), 2:4],"matrix"),
91                       as(mT[c(3,7), 2:4],"matrix")))            ##       fails because of 'dimnames'
92              identical(mm[c(3,7), 2:4], as(mT[c(3,7), 2:4],"matrix"))
93              )
94
95  x.x <- crossprod(mC)  x.x <- crossprod(mC)
96  stopifnot(class(x.x) == "dsCMatrix",  stopifnot(class(x.x) == "dsCMatrix",
# Line 185  Line 187
187  H[c(1:2, 4, 6:7), c(2:4,6)] <- 0  H[c(1:2, 4, 6:7), c(2:4,6)] <- 0
188  (H. <- round(as(H, "sparseMatrix"), 3)[ , 2:7])  (H. <- round(as(H, "sparseMatrix"), 3)[ , 2:7])
189  Hc. <- Hc  Hc. <- Hc
190    ## This assignment does not achieve the correct effect.  replCmat should be changed.
191  Hc.[c(1:2, 4, 6:7), c(2:4,6)] <- 0  Hc.[c(1:2, 4, 6:7), c(2:4,6)] <- 0
192  Hc.[, 1:6]  Hc.[, 1:6]
193

Legend:
 Removed from v.1362 changed lines Added in v.1367