externalMatrix        package:externalVector        R Documentation

_C_r_e_a_t_e _a_n _e_x_t_e_r_n_a_l _m_a_t_r_i_x _o_b_j_e_c_t

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

     This function can be used to create a new external matrix object.

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

     externalMatrix(data = NA, nrow = 1, ncol = 1, byrow = FALSE, dimnames =
     NULL, storageClass = (if (is(data, "externalVectorWithStorage"))
     class(data@storage) else "simpleStorage"), indirect = FALSE)

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

    data: An optional data vector. 

    nrow: The desired number of rows. 

    ncol: The desired number of columns. 

   byrow: Not used. 

dimnames: A 'dimnames' value for the external matrix: a 'list' of
          length 2. 

storageClass: name of the subclass of "externalStorage" to be used for
          storing the external vector elements. 

indirect: If 'TRUE', return an "indirectExternalVector" object. 

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

     This function is similar to the 'matrix' function in R base
     package.

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

     If 'indirect' is 'FALSE' (the default) a new external matrix
     object with correct dimension and dimnames. Otherwise create a new
     external vector object but return it by wrapping it in an
     "indirectExternalMatrix" object with the correct dimension and
     dimnames.

_S_e_e _A_l_s_o:

     'matrix'

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

     x <- externalMatrix(1:6, nrow=2, ncol=3)
     dim(x)
     x[1, 1:2] # drop = FALSE by default
     log(x)

