na.omit {terra} | R Documentation |
Find and remove geometries that are NA
Description
Find geometries that are NA; or remove geometries and/or records that are NA
.
Usage
## S4 method for signature 'SpatVector'
is.na(x)
## S4 method for signature 'SpatVector'
na.omit(object, field=NA, geom=FALSE)
Arguments
x |
SpatVector |
object |
SpatVector |
field |
character or NA. If |
geom |
logical. If |
Value
SpatVector
Examples
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
v$test <- c(1,2,NA)
nrow(v)
x <- na.omit(v, "test")
nrow(x)
[Package terra version 1.7-78 Index]