empty_to_na | R Documentation |
This function converts an empty vector to a scalar NA of the same type as the input.
empty_to_na(x)
x |
An atomic vector, of one of these types: |
An atomic vector of the same type as x
. If x
is empty
then NA
is returned, otherwise x
is returned as is.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.