na_exclude: Exclude features with NA attributes

Description Usage Arguments Value Examples

View source: R/na_exclude.R

Description

This function removes the features of a SpatialPointsDataFrame for which there is NA is the attributes.

Usage

1
na_exclude(spdf)

Arguments

spdf

A SpatialPointsDataFrame object.

Value

A SpatialPointsDataFrame object.

Examples

1
2
3
4
5
6
7
8
library(imhen)

stations <-  imhen::stations
stations <- sf::as_Spatial(stations)
stations@data$elevation[seq(2, 12, 2)] <- NA

head(stations@data)
head(na_exclude(stations)@data)

choisy/sptools documentation built on Aug. 22, 2019, 12:57 p.m.