SCM

SCM Repository

[matrix] Diff of /pkg/R/Matrix.R
ViewVC logotype

Diff of /pkg/R/Matrix.R

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

revision 477, Wed Feb 2 14:14:59 2005 UTC revision 499, Fri Feb 4 18:16:32 2005 UTC
# Line 19  Line 19 
19    
20  Matrix.class <- function(x, tol = 0, symmetry = TRUE, unit.diagonal = TRUE,  Matrix.class <- function(x, tol = 0, symmetry = TRUE, unit.diagonal = TRUE,
21                           triangularity = c(TRUE, TRUE),                           triangularity = c(TRUE, TRUE),
22                           orthogonality = c(TRUE, TRUE), normality = c(TRUE, TRUE))                           orthogonality = c(TRUE, TRUE),
23                             normality = c(TRUE, TRUE))
24  {  {
25      val <- "Matrix"      val <- "Matrix"
26      x <- as.matrix(x)      x <- as.matrix(x)
# Line 63  Line 64 
64    
65  as.Matrix <- function(x, tol = .Machine$double.eps)  as.Matrix <- function(x, tol = .Machine$double.eps)
66  {  {
67      if (inherits(x, "Matrix")) return(asObject(x, Matrix.class(x, tol = tol)))      asObject(if (inherits(x, "Matrix")) x else as.matrix(x),
68      asObject(as.matrix(x), Matrix.class(x, tol = tol))               Matrix.class(x, tol = tol))
69  }  }

Legend:
Removed from v.477  
changed lines
  Added in v.499

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