Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions CRAN-SUBMISSION

This file was deleted.

2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: paar
Type: Package
Title: Precision Agriculture Data Analysis
Version: 1.0.1
Version: 1.0.2.9000
Authors@R:
c(
person("Pablo", "Paccioretti", email = "pablopaccioretti@agro.unc.edu.ar",
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# (development version)
# paar (development version)

# paar 1.0.2

* Help pages were revised for clarity, consistency, and improved user guidance [#21](https://github.com/PPaccioretti/paar/issues/21)
* Now Summary index is calculated correctly.
Expand Down
20 changes: 8 additions & 12 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ knitr::opts_chunk$set(
[![R-CMD-check](https://github.com/PPaccioretti/paar/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/PPaccioretti/paar/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

The goal of `paar` is to provide useful functions for
precision agriculture spatial data depuration.
The goal of `paar` is to provide useful tools for cleaning and processing spatial data in precision agriculture.

## Installation

Expand All @@ -41,39 +40,36 @@ pak::pkg_install("PPaccioretti/paar")

## Example

The package has a complete protocol for automating error removal. Default
values of all functions are optimized for precision agricultural data.
The package provides a complete protocol for automated error removal.
Default values of all functions are optimized for precision agriculture data.

```{r example, message=FALSE}
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.
The `barley` dataset contains grain yield data collected were using calibrated commercial yield monitors, mounted on combines equipped with DGPS.

```{r barley}
#Convert barley data to an spatial object
barley_sf <- st_as_sf(barley,
coords = c("X", "Y"),
crs = 32720)
barley_sf <- st_as_sf(barley, coords = c("X", "Y"), crs = 32720)

barley_dep <-
depurate(barley_sf,
"Yield")
depurate(barley_sf, "Yield")

# Summary of depurated data
summary(barley_dep)
```

Spatial yield values before and after depuration process can be plotted
Spatial yield values before and after the depuration process can be visualized

```{r, fig.height=2, fig.height=5, out.width="50%", fig.show="hold"}
plot(barley_sf["Yield"], main = "Before depuration")
plot(barley_dep$depurated_data["Yield"], main = "After depuration")
```

Also distribution of yield values can be plotted
The distribution of yield values can also be compared

```{r, fig.height=2, fig.height=5, out.width="50%", fig.show="hold"}
boxplot(barley_sf[["Yield"]], main = "Before depuration")
Expand Down
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](h
[![R-CMD-check](https://github.com/PPaccioretti/paar/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/PPaccioretti/paar/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

The goal of `paar` is to provide useful functions for precision
agriculture spatial data depuration.
The goal of `paar` is to provide useful tools for cleaning and
processing spatial data in precision agriculture.

## Installation

Expand All @@ -33,29 +33,27 @@ pak::pkg_install("PPaccioretti/paar")

## Example

The package has a complete protocol for automating error removal.
Default values of all functions are optimized for precision agricultural
The package provides a complete protocol for automated error removal.
Default values of all functions are optimized for precision agriculture
data.

``` r
library(paar)
library(sf)
#> Warning: package 'sf' was built under R version 4.5.2
data("barley", package = 'paar')
```

`barley` data contains barley grain yield which were obtained using
The `barley` dataset contains grain yield data collected were using
calibrated commercial yield monitors, mounted on combines equipped with
DGPS.

``` r
#Convert barley data to an spatial object
barley_sf <- st_as_sf(barley,
coords = c("X", "Y"),
crs = 32720)
barley_sf <- st_as_sf(barley, coords = c("X", "Y"), crs = 32720)

barley_dep <-
depurate(barley_sf,
"Yield")
depurate(barley_sf, "Yield")
#> Concave hull algorithm is computed with
#> concavity = 2 and length_threshold = 0

Expand All @@ -67,23 +65,24 @@ summary(barley_dep)
#> 99 (1.3%) 6 (0.081%)
```

Spatial yield values before and after depuration process can be plotted
Spatial yield values before and after the depuration process can be
visualized

``` r
plot(barley_sf["Yield"], main = "Before depuration")
plot(barley_dep$depurated_data["Yield"], main = "After depuration")
```

<img src="man/figures/README-unnamed-chunk-2-1.png" width="50%" /><img src="man/figures/README-unnamed-chunk-2-2.png" width="50%" />
<img src="man/figures/README-unnamed-chunk-2-1.png" alt="" width="50%" /><img src="man/figures/README-unnamed-chunk-2-2.png" alt="" width="50%" />

Also distribution of yield values can be plotted
The distribution of yield values can also be compared

``` r
boxplot(barley_sf[["Yield"]], main = "Before depuration")
boxplot(barley_dep$depurated_data[["Yield"]], main = "After depuration")
```

<img src="man/figures/README-unnamed-chunk-3-1.png" width="50%" /><img src="man/figures/README-unnamed-chunk-3-2.png" width="50%" />
<img src="man/figures/README-unnamed-chunk-3-1.png" alt="" width="50%" /><img src="man/figures/README-unnamed-chunk-3-2.png" alt="" width="50%" />

## References

Expand Down
14 changes: 10 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
## R CMD check results
## Test environments
* macOS (devel and release)
* windows (devel and release)
* Ubuntu (devel and release)

## Submission note

0 errors | 0 warnings | 1 note
* This submission fixes some bugs
* No reverse dependencies

* This is a new release.
## R CMD check results

We are resubmitting the package after addressing the CRAN comments from the first submission.
0 errors | 0 warnings | 0 note
57 changes: 45 additions & 12 deletions man/compare_zone.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading