to_boolean | R Documentation |
Convert a vector to boolean/logical
to_boolean(x, ...)
## S3 method for class 'logical'
to_boolean(x, ...)
## S3 method for class 'numeric'
to_boolean(x, true = 1L, false = 0L, ...)
## S3 method for class 'character'
to_boolean(x, true = NULL, false = NULL, ...)
## S3 method for class 'factor'
to_boolean(x, true = NULL, false = NULL, ...)
x |
A vector of values |
... |
Additional arguments passed to methods |
true |
A vector of values to convert to |
false |
A vector of values to convert to |
A logical
vector of equal length as x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.