rev                   package:base                   R Documentation

_R_e_v_e_r_s_e _a _V_e_c_t_o_r'_s _E_l_e_m_e_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     `rev' provides a reversed version of its argument. It can be used
     in combination with `sort' to obtain vectors sorted into
     descending order.

_U_s_a_g_e:

     rev(x)

_S_e_e _A_l_s_o:

     `seq', `sort'.

_E_x_a_m_p_l_e_s:

     x <- c(1:5,5:3)
     # sort into descending order
     rev(sort(x))
     stopifnot(rev(1:7) == 7:1)#- don't need `rev' here

