tabulate package:base R Documentation _T_a_b_u_l_a_t_i_o_n _f_o_r _V_e_c_t_o_r_s _D_e_s_c_r_i_p_t_i_o_n: 'tabulate' takes the integer-valued vector 'bin' and counts the number of times each integer occurs in it. _U_s_a_g_e: tabulate(bin, nbins = max(1, bin)) _A_r_g_u_m_e_n_t_s: bin: a numeric vector (of positive integers), or a factor. nbins: the number of bins to be used. _D_e_t_a_i_l_s: 'tabulate' is used as the basis of the 'table' function. If 'bin' is a factor, its internal integer representation is tabulated. If the elements of 'bin' are numeric but not integers, they are truncated to the nearest integer. _V_a_l_u_e: An integer vector (without names). There is a bin for each of the values '1, ..., nbins'; values outside that range are (silently) ignored. _S_e_e _A_l_s_o: 'table', 'factor'. _E_x_a_m_p_l_e_s: tabulate(c(2,3,5)) tabulate(c(2,3,3,5), nbins = 10) tabulate(c(-2,0,2,3,3,5)) # -2 and 0 are ignored tabulate(c(-2,0,2,3,3,5), nbins = 3) tabulate(factor(letters[1:10]))