xtfrm package:base R Documentation _A_u_x_i_l_i_a_r_y _F_u_n_c_t_i_o_n _f_o_r _S_o_r_t_i_n_g _a_n_d _R_a_n_k_i_n_g _D_e_s_c_r_i_p_t_i_o_n: A generic auxiliary function that produces a numeric vector which will sort in the same order as 'x'. _U_s_a_g_e: xtfrm(x) _A_r_g_u_m_e_n_t_s: x: an R object. _D_e_t_a_i_l_s: This is a special case of ranking, but as a less general function than 'rank' is more suitable to be made generic. The default method is equivalent to 'rank(x, ties.method="min", na.last="keep")', so 'NA' values are given rank 'NA' and all tied values are given equal integer rank. The 'factor' method extracts the codes. The 'Surv' method sorts first on times and then on status code(s). The default method will make use of '==' and '>' methods for the class of 'x[i]' (for integers 'i'), and the 'is.na' method for the class of 'x', but might be rather slow when doing so. _V_a_l_u_e: A numeric (usually integer) vector of the same length as 'x'. _S_e_e _A_l_s_o: 'rank', 'sort', 'order'.