longitude <- c(-122.5, -122.4)
latitude <- c(47.5, 47.6)
validateLonsLats(longitude, latitude)
# Remove missing values before validation
validateLonsLats(
c(-122.5, NA),
c(47.5, NA),
na.rm = TRUE
)
if (FALSE) {
validateLonsLats(c(-200, 0), c(45, 46))
}
Run the code above in your browser using DataLab