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 'is.na' methods
     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'.

