SCM

SCM Repository

[matrix] Diff of /pkg/Matrix/man/externalFormats.Rd
ViewVC logotype

Diff of /pkg/Matrix/man/externalFormats.Rd

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

revision 2676, Sat Jun 25 19:14:05 2011 UTC revision 2677, Sat Jun 25 19:18:12 2011 UTC
# Line 74  Line 74 
74  writeMM(KNex$mm, "mmMM.mtx")  writeMM(KNex$mm, "mmMM.mtx")
75    
76  ## very simple export - in triplet format - to text file:  ## very simple export - in triplet format - to text file:
77    data(CAex)
78  s.CA <- summary(CAex)  s.CA <- summary(CAex)
79  message("writing to ", outf <- tempfile())  message("writing to ", outf <- tempfile())
80  write.table(s.CA, file = outf, row.names=FALSE)  write.table(s.CA, file = outf, row.names=FALSE)
81    ## and read it back -- showing off  sparseMatrix():
82    dd <- read.table(outf, header=TRUE)
83    mm <- do.call(sparseMatrix, dd)
84    stopifnot(all.equal(mm, CAex, tol=1e-15))
85  }  }
86  \keyword{IO}  \keyword{IO}
87  \keyword{array}  \keyword{array}

Legend:
Removed from v.2676  
changed lines
  Added in v.2677

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