externalVector        package:externalVector        R Documentation

_C_r_e_a_t_i_n_g _e_x_t_e_r_n_a_l _v_e_c_t_o_r_s

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

     These functions can be used to create new external vector objects
     with newly allocated storage.

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

     externalVector(type = "logical", length = 0, storageClass = "simpleStorage", indirect = FALSE)
     externalLogical(length = 0, storageClass = "simpleStorage", indirect = FALSE)
     externalInteger(length = 0, storageClass = "simpleStorage", indirect = FALSE)
     externalNumeric(length = 0, storageClass = "simpleStorage", indirect = FALSE)
     externalComplex(length = 0, storageClass = "simpleStorage", indirect = FALSE)
     externalCharacter(length = 0, storageClass = "simpleStorage", indirect = FALSE)

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

    type: A character-string, the name of the class of basic R vectors
          to be represented by the new external vector object. 

  length: Length of the new external vector 

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:

     These functions are similar to the 'vector', 'logical', 'integer',
     'numeric', 'complex' and 'character' functions in the R base
     package. These functions have an extra argument 'storageClass' to
     specify the external storage class to use. The default is to use
     "simpleStorage" which uses garbage collected memory from R for
     storage.

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

     If 'indirect' is 'FALSE' (the default) the a new external vector
     object of the given length, given type with elements stored in an
     external storage object with class 'storageClass'. Otherwise
     create the new external vector object but return it by wrapping it
     in an "indirectExternalVector" object.

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

     'vector', 'logical', 'integer', 'numeric', 'complex', 'character',
      'list'

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

     x <- externalVector("numeric", 4)
     x[] <- 1:4
     x[1:3]
     y <- x+2
     y
     x+y

