as_boolean: Convert NULL values to FALSE and non-NULLs to their logical...

Description Usage Arguments Details Value

Description

The core function as.logical() crashes if you give it a NULL. This convenience function turns those NULLs into FALSE and preserves the same output as as.logical() for non-NULLs.

Usage

1
as_boolean(value)

Arguments

value

value to be converted to boolean

Details

It probably needs a bit more work to make it behave the same way as as.logical() does for vectors. For the moment, this is just working on single values when they are NULL.

Value

input value as a boolean


langfob/tzar documentation built on May 20, 2019, 7:56 p.m.