Learn R Programming

PoDBAY (version 1.4.3)

numToBool: Numeric to boolean

Description

Converts numeric format to boolean format.

Usage

numToBool(x)

Arguments

x

numeric value (0, 1)

Value

boolean value (T, F)

Details

If the function is supposed to be used on a vector, the form sapply("vector", numToBool) needs to be applied.

Examples

Run this code
# NOT RUN {
dStatus <- c(0,0,1,1,0,1)
sapply(dStatus, numToBool)

# }

Run the code above in your browser using DataLab