Find and remove geometries that are NA
na.omit.Rd
Find geometries that are NA; or remove geometries and/or records that are NA
.
Usage
# S4 method for class 'SpatVector'
is.na(x)
# S4 method for class 'SpatVector'
na.omit(object, field=NA, geom=FALSE)
Examples
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
v$test <- c(1,2,NA)
nrow(v)
#> [1] 12
x <- na.omit(v, "test")
nrow(x)
#> [1] 8