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 2439, Sat Jul 18 16:03:36 2009 UTC revision 2472, Sat Sep 19 06:10:48 2009 UTC
# Line 325  Line 325 
325                       s[i,drop=FALSE], S[i,drop=FALSE]))                       s[i,drop=FALSE], S[i,drop=FALSE]))
326  stopifnot(identical5(m[L,drop=FALSE], M[L,drop=FALSE], D[L,drop=FALSE],  stopifnot(identical5(m[L,drop=FALSE], M[L,drop=FALSE], D[L,drop=FALSE],
327                       s[L,drop=FALSE], S[L,drop=FALSE]))                       s[L,drop=FALSE], S[L,drop=FALSE]))
328  ##  ## using L for row-indexing should give an error
329    assertError(m[L,]); assertError(m[L,, drop=FALSE])
330    ## these did not signal an error, upto (including) 0.999375-30:
331    assertError(s[L,]); assertError(s[L,, drop=FALSE])
332    assertError(S[L,]); assertError(S[L,, drop=FALSE])
333    
334    ## row indexing:
335  assert.EQ.mat(D[i,], m[i,])  assert.EQ.mat(D[i,], m[i,])
336  assert.EQ.mat(M[i,], m[i,])  assert.EQ.mat(M[i,], m[i,])
337  assert.EQ.mat(s[i,], m[i,])  assert.EQ.mat(s[i,], m[i,])
338  assert.EQ.mat(S[i,], m[i,])  assert.EQ.mat(S[i,], m[i,])
339    ## column indexing:
340  assert.EQ.mat(D[,i], m[,i])  assert.EQ.mat(D[,i], m[,i])
341  assert.EQ.mat(M[,i], m[,i])  assert.EQ.mat(M[,i], m[,i])
342  assert.EQ.mat(s[,i], m[,i])  assert.EQ.mat(s[,i], m[,i])

Legend:
Removed from v.2439  
changed lines
  Added in v.2472

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