is.unsorted               package:base               R Documentation

_T_e_s_t _i_f _a_n _O_b_j_e_c_t _i_s _N_o_t _S_o_r_t_e_d

_D_e_s_c_r_i_p_t_i_o_n:

     Test if an object is not sorted, without the cost of sorting it.

_U_s_a_g_e:

     is.unsorted(x, na.rm = FALSE, strictly = FALSE)

_A_r_g_u_m_e_n_t_s:

       x: an R object with a class or a numeric, complex, character or
          logical vector.

   na.rm: logical.  Should missing values be removed before checking?

strictly: logical indicating if the check should be for _strictly_
          increasing values.

_V_a_l_u_e:

     A length-one logical value.  All objects of length 0 or 1 are
     sorted: the result will be 'NA' for objects of length 2 or more
     except for atomic vectors and objects with a class (where the '>='
     or '>' method is used).

_S_e_e _A_l_s_o:

     'sort', 'order'.

