all                   package:base                   R Documentation

_A_r_e _A_l_l _V_a_l_u_e_s _T_r_u_e?

_D_e_s_c_r_i_p_t_i_o_n:

     Given a set of logical vectors, are all of the values true?

_U_s_a_g_e:

     all(..., na.rm = FALSE)

_A_r_g_u_m_e_n_t_s:

     ...: one or more logical vectors.  Other objects are coerced in a
          similar way as 'as.logical.default'.

   na.rm: logical.  If true 'NA' values are removed before the result
          is computed.

_D_e_t_a_i_l_s:

     This is a generic function: methods can be defined for it directly
     or via the 'Summary' group generic. For this to work properly, the
     arguments '...' should be unnamed, and dispatch is on the first
     argument.

_V_a_l_u_e:

     Given a sequence of logical arguments, a logical value indicating
     whether or not all of the elements of 'x' are 'TRUE'.

     The value returned is 'TRUE' if all of the values in 'x' are
     'TRUE', and 'FALSE' if any of the values in 'x' are 'FALSE'.

     If 'na.rm = FALSE' and 'x' consists of a mix of 'TRUE' and 'NA'
     values, the value is 'NA'.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

_S_e_e _A_l_s_o:

     'any', the "complement" of 'all', and 'stopifnot(*)' which is an
     'all(*)' "insurance".

_E_x_a_m_p_l_e_s:

     range(x <- sort(round(rnorm(10) - 1.2, 1)))
     if(all(x < 0)) cat("all x values are negative\n")

