na.omit | R Documentation |
Find geometries that are NA; or remove geometries and/or records that are NA
.
## S4 method for signature 'SpatVector'
is.na(x)
## S4 method for signature 'SpatVector'
na.omit(object, field=NA, geom=FALSE)
x |
SpatVector |
object |
SpatVector |
field |
character or NA. If |
geom |
logical. If |
SpatVector
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.