"logical", and the basic logical constants.
TRUE FALSE T; Flogical(length = 0) as.logical(x, ...) is.logical(x)
logicalcreates a logical vector of the specified length. Each element of the vector is equal to
as.logicalattempts to coerce its argument to be of logical type. For
factors, this uses the
as.vectorit strips attributes including names. Character strings
c("T", "TRUE", "True", "true")are regarded as true,
c("F", "FALSE", "False", "false")as false, and all others as
FALSEdepending on whether its argument is of logical type or not.
FALSEare reserved words denoting logical constants in the R language, whereas
Fare global variables whose initial values set to these. All four are
Logical vectors are coerced to integer vectors in contexts where a
numerical value is required, with
TRUE being mapped to
NA, the other logical constant.