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

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

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

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