R Warning message : is.na() applied to non-(list or vector) of type ‘builtin’ (2 Examples)
In this tutorial you’ll learn how to avoid the warning message : “is.na() applied to non-(list or vector)” in the R programming language.
Example 1: Replicating the Warning message : is.na() applied to non-(list or vector) of type ‘builtin’
is.na(sum) # Apply is.na to function name # [1] FALSE # Warning message: # In is.na(sum) : is.na() applied to non-(list or vector) of type 'builtin' |
is.na(sum) # Apply is.na to function name # [1] FALSE # Warning message: # In is.na(sum) : is.na() applied to non-(list or vector) of type 'builtin'
Example 2: Fixing the Warning message : is.na() applied to non-(list or vector) of type ‘builtin’
vec <- 1:5 # Construct some example data vec # Print example data # [1] 1 2 3 4 5 |
vec <- 1:5 # Construct some example data vec # Print example data # [1] 1 2 3 4 5
is.na(vec) # Apply is.na to data object # [1] FALSE FALSE FALSE FALSE FALSE |
is.na(vec) # Apply is.na to data object # [1] FALSE FALSE FALSE FALSE FALSE
Related Tutorials & Further Resources
Have a look at the following tutorials. They illustrate topics such as extracting data, vectors, and ggplot2: