SCM

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1228 - (view) (download) (as text)
Original Path: pkg/man/externalFormats.Rd

1 : bates 825 \name{externalFormats}
2 : bates 853 \docType{genericFunction}
3 : bates 825 \alias{readHB}
4 :     \alias{readMM}
5 : bates 853 \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 : bates 825 \title{Read and write external matrix formats}
16 :     \description{
17 : bates 853 Read matrices stored in the Harwell-Boeing or MatrixMarket formats
18 :     or write sparseMatrix objects to one of these formats.
19 : bates 825 }
20 :     \usage{
21 : bates 853 readHB(file)
22 :     readMM(file)
23 :     writeHB(obj, file, ...)
24 :     writeMM(obj, file, ...)
25 : bates 825 }
26 :     \arguments{
27 : bates 853 \item{obj}{a real sparse matrix}
28 :     \item{file}{for \code{writeHB} and \code{writeMM} - the name of the
29 :     file to be written. For \code{readHB} and \code{readMM}
30 :     the name of the file to read, as a character scalar.
31 :     The names of files storing matrices in the Harwell-Boeing format
32 :     usually end in \code{".rua"} or \code{".rsa"}. Those storing
33 :     matrices in the MatrixMarket format usually end in {".mtx"}.
34 :    
35 :     Alternatively, \code{readHB} accepts a connection object.}
36 :     \item{\dots}{optional additional arguments. Currently none are used in
37 :     any methods.}
38 : bates 825 }
39 :     \value{
40 : bates 853 The \code{readHB} and \code{readMM} functions return an object that
41 :     inherits from the \code{"Matrix"} class. Methods for the
42 :     \code{writeHB} and \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 Harwell-Boeing format (writeHB)
45 :     or the MatrixMarket format (writeMM).
46 : bates 825 }
47 :     \references{
48 :     \url{http://math.nist.gov/MatrixMarket}
49 : bates 826
50 :     \url{http://www.cise.ufl.edu/research/sparse/matrices}
51 : bates 825 }
52 : bates 826 \examples{
53 : bates 835 str(pores <- readMM(system.file("external/pores_1.mtx",
54 :     package = "Matrix")))
55 :     str(utm <- readHB(system.file("external/utm300.rua",
56 :     package = "Matrix")))
57 :     str(lundA <- readMM(system.file("external/lund_a.mtx",
58 :     package = "Matrix")))
59 :     str(lundA <- readHB(system.file("external/lund_a.rsa",
60 :     package = "Matrix")))
61 : bates 853 \dontrun{
62 : maechler 856 ## NOTE: The following examples take quite some time
63 :     ## ---- even on a fast internet connection:
64 : bates 857 str(sm <-
65 :     readHB(gzcon(url("http://www.cise.ufl.edu/research/sparse/HBformat/Boeing/msc00726.rsa.gz"))))
66 : bates 853 str(jgl009 <-
67 :     readMM(gzcon(url("ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/counterx/jgl009.mtx.gz"))))
68 : bates 826 }
69 : maechler 1228 data(KNex)
70 :     writeHB(KNex$mm, "mmHB.rua")
71 :     writeMM(KNex$mm, "mmMM.mtx")
72 : bates 853 }
73 : bates 825 \keyword{IO}
74 : bates 853 \keyword{array}
75 : bates 825 \keyword{algebra}
76 :    

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