SCM

SCM Repository

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

Diff of /pkg/R/sparseMatrix.R

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

revision 1854, Tue May 22 14:20:31 2007 UTC revision 1855, Wed May 23 21:33:34 2007 UTC
# Line 356  Line 356 
356                ## return a data frame (int, int,  {double|logical|...})  :                ## return a data frame (int, int,  {double|logical|...})  :
357                r <- data.frame(i = T@i + 1L, j = T@j + 1L, x = T@x)                r <- data.frame(i = T@i + 1L, j = T@j + 1L, x = T@x)
358                attr(r, "header") <-                attr(r, "header") <-
359                    sprintf('%d x %d sparse Matrix of class "%s", with entries',                    sprintf('%d x %d sparse Matrix of class "%s", with %d entries',
360                            d[1], d[2], class(object))                            d[1], d[2], class(object), nnzero(object))
361                ## use ole' S3 technology for such a simple case                ## use ole' S3 technology for such a simple case
362                class(r) <- c("sparseSummary", class(r))                class(r) <- c("sparseSummary", class(r))
363                r                r

Legend:
Removed from v.1854  
changed lines
  Added in v.1855

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