# replace NULL (for R < 4.4)
NULL %||% 1L
2L %||% 1L
# replace empty
"" %|||% 1L
NA %|||% 1L
double() %|||% 1L
NULL %|||% 1L
# replace no length
logical() %len% TRUE
FALSE %len% TRUE
Run the code above in your browser using DataLab