binit               package:bigmemory               R Documentation

_C_o_u_n_t _e_l_e_m_e_n_t_s _a_p_p_e_a_r_i_n_g _i_n _b_i_n_s _o_f _o_n_e _o_r _t_w_o _v_a_r_i_a_b_l_e_s.

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

     This provides preliminary counting functionality to eventually
     support graphical exploration.

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

     binit(x, cols, breaks=10)

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

       x: a 'big.matrix'.

    cols: a vector of column indices or names of length 1 or 2.

  breaks: a number of bins to span the range from the maximum to the
          minimum, or a vector (1-variable case) or list of two vectors
          (2-variable case) where each vector is a triplet of min, max,
          and number of bins.

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

     The user may specify the number of bins to be used, of equal
     widths, spanning the range of the data (the default is 10 bins). 
     The user may also specify the range to be spanned along with the
     number of bins, in case a summary of a subrange of the data is
     desired.  Either univariate or bivariate counting is supported.

     The function uses left-closed intervals [a,b) except in the
     right-most bin, where the interval is entirely closed.

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

     a list containing (a) vector (1-variable case) or a matrix
     (2-variable case) of counts of the numbers of cases appearing in
     each of the bins, (b) description(s) of bin centers, and (c)
     description(s) of breaks between the bins.

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

     John W. Emerson and Michael J. Kane

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

     'big.matrix'

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

     x <- as.big.matrix(matrix(rnorm(40), 20, 2), type="double")
     x[1,1] <- NA
     x[,]
     binit(x, 1:2, list(c(-1,1,5), c(-1,1,2)))
     binit(x, 1:2)
     binit(x, 1:2, 5)
     binit(x, 1)

     x <- as.big.matrix(matrix(rnorm(400), 200, 2), type="double")
     x[,1] <- x[,1] + 3
     x.binit <- binit(x, 1:2)
     filled.contour(round(x.binit$rowcenters,2), round(x.binit$colcenters,2),
                    x.binit$counts, xlab="Variable 1",
                    ylab="Variable 2")

