logical                 package:base                 R Documentation

_L_o_g_i_c_a_l _V_e_c_t_o_r_s

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

     Create or test for objects of type '"logical"', and the basic
     logical constants.

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

     TRUE
     FALSE
     T; F

     logical(length = 0)
     as.logical(x, ...)
     is.logical(x)

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

  length: desired length.

       x: object to be coerced or tested.

     ...: further arguments passed to or from other methods.

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

     'TRUE' and 'FALSE' are reserved words denoting logical constants
     in the R language, whereas 'T' and 'F' are global variables whose
     initial values set to these.  All four are 'logical(1)' vectors.

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

     'logical' creates a logical vector of the specified length. Each
     element of the vector is equal to 'FALSE'.

     'as.logical' attempts to coerce its argument to be of logical
     type.  For 'factor's, this uses the 'levels' (labels).  Like
     'as.vector' it strips attributes including names.

     'is.logical' returns 'TRUE' or 'FALSE' depending on whether its
     argument is of logical type or not.

_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:

     'NA', the other logical constant.

