View source: R/TruthyHelpers.R
isTruthyInside | R Documentation |
isTruthyInside
tests the "truthiness" of positions
of a vector or list (while isTruthy
tests the vector as a whole).
isTruthyInside(x)
x |
A vector or list |
isTruthyInside
A logical vector for each position indicating TRUE
/FALSE
.
Returns NULL
if the object x
itself is not truthy or missing.
isTruthyInside(1:5) #> [1] TRUE TRUE TRUE TRUE TRUE isTruthyInside(c(1, NA, 2)) #> [1] TRUE FALSE TRUE isTruthyInside(list(1, NA, NULL, integer(0), 2)) #> [1] TRUE FALSE FALSE FALSE TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.