SCM

SCM Repository

[matrix] Diff of /pkg/inst/test-tools.R
ViewVC logotype

Diff of /pkg/inst/test-tools.R

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

revision 1547, Mon Sep 11 14:49:39 2006 UTC revision 1548, Mon Sep 11 22:13:07 2006 UTC
# Line 1  Line 1 
1  #### Will be sourced by several R scripts in ../tests/  #### Will be sourced by several R scripts in ../tests/
2    
3    paste0 <- function(...) paste(..., sep = '')
4    
5  identical3 <- function(x,y,z)   identical(x,y) && identical (y,z)  identical3 <- function(x,y,z)   identical(x,y) && identical (y,z)
6  identical4 <- function(a,b,c,d) identical(a,b) && identical3(b,c,d)  identical4 <- function(a,b,c,d) identical(a,b) && identical3(b,c,d)
7    
# Line 13  Line 15 
15    
16  ## checking;  'show' is for convenience of the developer  ## checking;  'show' is for convenience of the developer
17  assert.EQ.mat <- function(M, m, tol = if(show) 0 else 1e-15, show=FALSE) {  assert.EQ.mat <- function(M, m, tol = if(show) 0 else 1e-15, show=FALSE) {
18      MM <- as(M, "matrix")      MM <- as.mat(M) # as(M, "matrix")
19      if(is.logical(MM) && is.numeric(m))      if(is.logical(MM) && is.numeric(m))
20          storage.mode(MM) <- "integer"          storage.mode(MM) <- "integer"
21      attr(MM, "dimnames") <- attr(m, "dimnames") <- NULL      attr(MM, "dimnames") <- attr(m, "dimnames") <- NULL

Legend:
Removed from v.1547  
changed lines
  Added in v.1548

R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge