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 825, Sun Aug 7 15:22:33 2005 UTC revision 1620, Sat Oct 7 12:48:05 2006 UTC
# Line 1  Line 1 
1  \name{externalFormats}  \name{externalFormats}
2    \docType{genericFunction}
3  \alias{readHB}  \alias{readHB}
4  \alias{readMM}  \alias{readMM}
5    \alias{writeHB}
6    \alias{writeMM}
7    \alias{writeHB,dgCMatrix-method}
8    \alias{writeHB,dgTMatrix-method}
9    \alias{writeHB,dsCMatrix-method}
10    \alias{writeHB,dsTMatrix-method}
11    \alias{writeMM,dgCMatrix-method}
12    \alias{writeMM,dgTMatrix-method}
13    \alias{writeMM,dsCMatrix-method}
14    \alias{writeMM,dsTMatrix-method}
15  \title{Read and write external matrix formats}  \title{Read and write external matrix formats}
16  \description{  \description{
17      Read matrices stored in the Harwell-Boeing or MatrixMarket formats.      Read matrices stored in the Harwell-Boeing or MatrixMarket formats
18        or write sparseMatrix objects to one of these formats.
19  }  }
20  \usage{  \usage{
21  readHB(filename)  readHB(file)
22  readMM(filename)  readMM(file)
23    writeHB(obj, file, ...)  # deprecated
24    writeMM(obj, file, ...)
25  }  }
26  \arguments{  \arguments{
27    \item{filename}{the name of the file to read, as a character scalar.   \item{obj}{a real sparse matrix}
28      The names of files storing matrices in the Harwell-Boeing format   \item{file}{for \code{writeMM} - the name of the file to be written.
29      usually end in \code{".rua"} or \code{".rsa"}.  Those storing     For \code{readHB} and \code{readMM} the name of the file to read, as
30      matrices in the MatrixMarket format usually end in {".mtx"}.}     a character scalar.  The names of files storing matrices in the
31       Harwell-Boeing format usually end in \code{".rua"} or \code{".rsa"}.
32       Those storing matrices in the MatrixMarket format usually end in
33       {".mtx"}.
34    
35       Alternatively, \code{readHB} and \code{readMM} accept connection objects.}
36     \item{\dots}{optional additional arguments. Currently none are used in
37       any methods.}
38  }  }
39  \value{  \value{
40    An object that inherits from the \code{"Matrix"} class.    The \code{readHB} and \code{readMM} functions return an object that
41      inherits from the \code{"Matrix"} class.  Methods for the
42      \code{writeMM} generic functions usually return
43      \code{NULL} and, as a side effect, the matrix \code{obj} is written to
44      \code{file} in the MatrixMarket format (writeMM).
45    }
46    \note{
47      The Harwell-Boeing format is older and less flexible than the
48     MatrixMarket format.  The function \code{writeHB} is now deprecated.
49     We recommend the use of \code{writeMM} instead.
50  }  }
51  \references{  \references{
52    \url{http://math.nist.gov/MatrixMarket}    \url{http://math.nist.gov/MatrixMarket}
53    
54      \url{http://www.cise.ufl.edu/research/sparse/matrices}
55    }
56    \examples{
57    str(pores <- readMM(system.file("external/pores_1.mtx",
58                                    package = "Matrix")))
59    str(utm <- readHB(system.file("external/utm300.rua",
60                                   package = "Matrix")))
61    str(lundA <- readMM(system.file("external/lund_a.mtx",
62                                    package = "Matrix")))
63    str(lundA <- readHB(system.file("external/lund_a.rsa",
64                                    package = "Matrix")))
65    \dontrun{
66    ## NOTE: The following examples take quite some time
67    ## ----  even on a fast internet connection:
68    str(sm <-
69     readHB(gzcon(url("http://www.cise.ufl.edu/research/sparse/HBformat/Boeing/msc00726.rsa.gz"))))
70    str(jgl009 <-
71     readMM(gzcon(url("ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/counterx/jgl009.mtx.gz"))))
72    }
73    data(KNex)
74    \dontrun{
75    writeHB(KNex$mm, "mmHB.rua")
76    }
77    writeMM(KNex$mm, "mmMM.mtx")
78  }  }
79  \keyword{IO}  \keyword{IO}
80    \keyword{array}
81  \keyword{algebra}  \keyword{algebra}
82    

Legend:
Removed from v.825  
changed lines
  Added in v.1620

root@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