depurate | R Documentation |
Data can be filtered by null, edge values, global outliers and spatial outliers or local defective observations. Default values are optimized for precision agricultural data.
depurate(
x,
y,
toremove = c("edges", "outlier", "inlier"),
crs = NULL,
buffer = -10,
ylimitmax = NA,
ylimitmin = 0,
sdout = 3,
ldist = 0,
udist = 40,
criteria = c("LM", "MP"),
zero.policy = NULL,
poly_border = NULL
)
x |
an |
y |
|
toremove |
|
crs |
coordinate reference system: integer with the EPSG code,
or character with proj4string to convert coordinates if |
buffer |
|
ylimitmax |
|
ylimitmin |
|
sdout |
|
ldist |
|
udist |
|
criteria |
|
zero.policy |
default NULL, use global option value; if FALSE stop with error for any empty neighbors sets, if TRUE permit the weights list to be formed with zero-length weights vectors |
poly_border |
|
Possible values for toremove
are one or more elements of:
All data points for a distance of buffer
m from data
edges are deleted.
Values that are outside the mean±sdout
are removed
Local Moran index of spatial autocorrelation is calculated for each datum as a tool to identify inliers
an object of class paar
with two elements:
sf
object with the data after the removal
process
character
vector with the condition of each
observation
Vega, A., Córdoba, M., Castro-Franco, M. et al. Protocol for automating error removal from yield maps. Precision Agric 20, 1030–1044 (2019). https://doi.org/10.1007/s11119-018-09632-8
library(sf)
data(barley, package = 'paar')
#Convert to an sf object
barley <- st_as_sf(barley,
coords = c("X", "Y"),
crs = 32720)
depurated <-
depurate(barley,
"Yield")
# Summary of depurated data
summary(depurated)
# Keep only depurate data
depurated_data <- depurated$depurated_data
# Combine the condition for all data
all_data_condition <- cbind(depurated, barley)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.