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.

