logical-na-handlers | R Documentation |
TRUE
or FALSE
Coerce NA values to TRUE
or FALSE
NA2TRUE(x)
NA2FALSE(x)
x |
A logical vector. |
x
with NA
values replaced with
TRUE
or FALSE
.
Sercan Kahveci
fruits <- c("apples","pears",NA,"cherries")
NA2TRUE(fruits != "apples")
NA2FALSE(fruits == "pears")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.