knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of paar
is to provide useful functions for
precision agriculture spatial data depuration.
You can install the released version of paar from CRAN with (not-yet):
# install.packages("paar")
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("PPaccioretti/paar")
The package has a complete protocol for automating error removal. Default values of all functions are optimized for precision agricultural data.
library(paar) library(sf) data("barley", package = 'paar')
barley
data contains barley grain yield which were obtained using calibrated commercial yield monitors, mounted on combines equipped with DGPS.
#Convert barley data to an spatial object barley_sf <- st_as_sf(barley, coords = c("X", "Y"), crs = 32720) barley_dep <- depurate(barley_sf, "Yield") # Summary of depurated data summary(barley_dep)
Spatial yield values before and after depuration process can be plotted
plot(barley_sf["Yield"], main = "Before depuration") plot(barley_dep$depurated_data["Yield"], main = "After depuration")
Also distribution of yield values can be plotted
boxplot(barley_sf[["Yield"]], main = "Before depuration") boxplot(barley_dep$depurated_data[["Yield"]], main = "After depuration")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.