slice.index package:base R Documentation _S_l_i_c_e _I_n_d_e_x_e_s _i_n _a_n _A_r_r_a_y _D_e_s_c_r_i_p_t_i_o_n: Returns a matrix of integers indicating the number of their slice in a given array. _U_s_a_g_e: slice.index(x, MARGIN) _A_r_g_u_m_e_n_t_s: x: an array. If 'x' has no dimension attribute, it is considered a one-dimensional array. MARGIN: an integer giving the dimension number to slice by. _V_a_l_u_e: An integer array 'y' with dimensions corresponding to those of 'x' such that all elements of slice number 'i' with respect to dimension 'MARGIN' have value 'i'. _S_e_e _A_l_s_o: 'row' and 'col' for determining row and column indexes; in fact, these are special cases of 'slice.index' corresponding to 'MARGIN' equal to 1 and 2, respectively when 'x' is a matrix. _E_x_a_m_p_l_e_s: x <- array(1 : 24, c(2, 3, 4)) slice.index(x, 2)