c(0:5) creates the vector
[1] 0 1 2 3 4 5
The subset operation returns the elements with the values of NA. Consider
c(0:5) -> a
a
#> [1] 0 1 2 3 4 5
a[NA]
#> [1] NA NA NA NA NA NA
a[1]
#> [1] 0
is.na(a)
#> [1] FALSE FALSE FALSE FALSE FALSE FALSE
Created on 2020-10-09 by the reprex package (v0.3.0.9001)