vctrs (version 0.0.0.9000)

vec_proxy_logical: Logical proxy

Description

vec_proxy_logical() converts an object to it's logical representation (if available). vec_restore_logical() restores a logical proxy back to the original type. The default methods allow any object built on a logical, integer, or numeric, to be coerced to logical, and leave the result as is.

Usage

vec_proxy_logical(x)

vec_restore_logical(x, to)

Arguments

Examples

Run this code
# NOT RUN {
x <- new_vctr(c(TRUE, FALSE, NA))
y <- new_vctr(c(TRUE, TRUE, TRUE))

!x
x | y
x & y
# }

Run the code above in your browser using DataLab