Incomplete sheet
This sheet is incomplete and could use some attention. Please submit code snippet suggestions as an issue or PR here.
logical
For representing boolean values
Constants
| Action |
Code |
Details |
|
True
|
|
|
|
False
|
|
|
Missing value (NA)
|
|
|
Create
| Action |
Code |
Details |
|
Empty logical vector, length 0
|
|
|
Logical vectors
| Action |
Code |
Details |
Logical vector of FALSE values, length n
|
|
|
|
Cast to logical
|
|
|
|
Parse string to logical
|
|
Parse failures return NA |
Test
| Action |
Code |
Details |
|
Is logical
|
|
|
Logical scalars
| Action |
Code |
Details |
Is scalar and TRUE
|
|
|
Is scalar and FALSE
|
|
|
Logical vectors
| Action |
Code |
Details |
All elements TRUE
|
|
Returns NA if x contains missing values! |
All elements are TRUE, ignoring NAs
|
|
|
All elements FALSE
|
|
Returns NA if x contains missing values! |
All elements are FALSE, ignoring NAs
|
|
|
All NA
|
|
|
Any NA
|
|
|
No NA
|
|
|
No NA
|
|
|
Convert
| Action |
Code |
Details |
|
To integer (zeros and ones)
|
|
|
|
To numeric (zeros and ones)
|
|
|
|
To character
|
|
|