SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log

Revision 857 - (download) (as text) (annotate)
Tue Aug 16 22:19:58 2005 UTC (13 years, 7 months ago) by bates
Original Path: pkg/man/externalFormats.Rd
File size: 2597 byte(s)
Change method of reading Harwell-Boeing matrix format and change example
\title{Read and write external matrix formats}
    Read matrices stored in the Harwell-Boeing or MatrixMarket formats
    or write sparseMatrix objects to one of these formats.
writeHB(obj, file, ...)
writeMM(obj, file, ...)
 \item{obj}{a real sparse matrix}
 \item{file}{for \code{writeHB} and \code{writeMM} - the name of the
   file to be written.  For \code{readHB} and \code{readMM}
   the name of the file to read, as a character scalar.
   The names of files storing matrices in the Harwell-Boeing format
   usually end in \code{".rua"} or \code{".rsa"}.  Those storing
   matrices in the MatrixMarket format usually end in {".mtx"}.

   Alternatively, \code{readHB} accepts a connection object.}
 \item{\dots}{optional additional arguments. Currently none are used in
   any methods.}
  The \code{readHB} and \code{readMM} functions return an object that
  inherits from the \code{"Matrix"} class.  Methods for the
  \code{writeHB} and \code{writeMM} generic functions usually return
  \code{NULL} and, as a side effect, the matrix \code{obj} is written to
  \code{file} in the Harwell-Boeing format (writeHB)
  or the MatrixMarket format (writeMM).

str(pores <- readMM(system.file("external/pores_1.mtx",
                                package = "Matrix")))
str(utm <- readHB(system.file("external/utm300.rua",
                               package = "Matrix")))
str(lundA <- readMM(system.file("external/lund_a.mtx",
                                package = "Matrix")))
str(lundA <- readHB(system.file("external/lund_a.rsa",
                                package = "Matrix")))
## NOTE: The following examples take quite some time
## ----  even on a fast internet connection:
str(sm <-
str(jgl009 <-
writeHB(mm, "mmHB.rua")
writeMM(mm, "mmMM.mtx")
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge