import                 package:spam                 R Documentation

_R_e_a_d _e_x_t_e_r_n_a_l _m_a_t_r_i_x _f_o_r_m_a_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Read matrices stored in the Harwell-Boeing or MatrixMarket
     formats.

_U_s_a_g_e:

     read.HB(file)
     read.MM(file)

_A_r_g_u_m_e_n_t_s:

    file: the name of the file to read, as a character scalar.  

          Alternatively, 'read.HB' and 'read.MM' accept connection
          objects.

_D_e_t_a_i_l_s:

     The names of files storing matrices in the Harwell-Boeing format
     usually end in '".rua"' or '".rsa"'. Those storing matrices in the
     MatrixMarket format usually end in '".mtx"'.

     Currently, only  real assembled Harwell-Boeing can be read with
     'read.HB'. Reading MatrixMarket formats is more flexible. However,
     as entries of 'spam' matrices are of mode 'double', integers
     matrices are coerced to doubles, patterns lead to matrices
     containing ones and complex are coerced to the real part thereof.
     In these aforementioned cases, a warning is issued.

     MatrixMarket also defines an array format, in which case a
     (possibly) dense 'spam' object is return (retaining only elements
     which are larger than 'spam.options('eps')'. A warning is issued.

_V_a_l_u_e:

     A sparse matrix of class  'spam'.

_N_o_t_e:

     The functions are based on 'readHB' and 'readMM' from the library
     'Matrix' to build the connection and read the raw data. At
     present, 'read.MM' is more flexible than  'readMM'.

_A_u_t_h_o_r(_s):

     Reinhard Furrer based on 'Matrix' functions by Douglas Bates
     bates@stat.wisc.edu and Martin Maechler maechler@stat.math.ethz.ch

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://math.nist.gov/MatrixMarket>

     <URL: http://www.cise.ufl.edu/research/sparse/matrices>

_E_x_a_m_p_l_e_s:

     ## Not run: 
     image(read.MM(gzcon(url(
       "ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/bcspwr/bcspwr01.mtx.gz"))))
     ## End(Not run)

     ## Not run: 
     ## Datasets supplied within Matrix
     str(read.MM(system.file("external/pores_1.mtx",package = "Matrix")))
     str(read.HB(system.file("external/utm300.rua", package = "Matrix")))
     str(read.MM(system.file("external/lund_a.mtx", package = "Matrix")))
     str(read.HB(system.file("external/lund_a.rsa", package = "Matrix")))
     ## End(Not run)

