From 8bffed5b35e21f719253b13d68c334cc9d293eaf Mon Sep 17 00:00:00 2001 From: florisvdh Date: Fri, 28 Feb 2020 17:15:07 +0100 Subject: [PATCH] Version 0.2.6: redo soilsurf_ost calculation in get_locs() * Previous fix (#42) erroneously used a calculation inside select(). That gave no error, but it did drop the soilsurf_ost variable. Now fixed with mutate(). --- .zenodo.json | 2 +- DESCRIPTION | 2 +- NEWS.md | 4 ++++ R/get.R | 7 ++++--- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index 3fef182..8140e9b 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -4,7 +4,7 @@ "license": "other-open", "upload_type": "software", "access_right": "open", - "version": "0.2.5", + "version": "0.2.6", "creators": [ { "name": "Vanderhaeghe, Floris", diff --git a/DESCRIPTION b/DESCRIPTION index e961dd7..8fb19e8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: watina Title: Querying And Processing Data From The INBO Watina Database -Version: 0.2.5 +Version: 0.2.6 Description: The R-package watina contains functions to query and process data from the Watina database at the Research Institute for Nature and Forest (INBO). This database primarily provides diff --git a/NEWS.md b/NEWS.md index a3bcdc6..5a39987 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# watina 0.2.6 + +- Redo fix `get_locs()`: calculation of `soilsurf_ost` (#43) + # watina 0.2.5 - Bugfix in `get_locs()`: calculation of `soilsurf_ost` (#42) diff --git a/R/get.R b/R/get.R index 2c6f5fa..36147d2 100644 --- a/R/get.R +++ b/R/get.R @@ -290,6 +290,9 @@ get_locs <- function(con, .data$filterdepth >= min_filterdepth | .data$MeetpuntTypeCode != "P" ) %>% + mutate(soilsurf_ost = + .data$ReferentieNiveauTAW - + .data$ReferentieNiveauMaaiveld) %>% select(loc_wid = .data$MeetpuntWID, loc_code = .data$MeetpuntCode, area_code = .data$GebiedCode, @@ -303,9 +306,7 @@ get_locs <- function(con, obswell_code = .data$PeilpuntCode, obswell_rank = .data$PeilpuntVersie, .data$filterdepth, - soilsurf_ost = - .data$ReferentieNiveauTAW - - .data$ReferentieNiveauMaaiveld) %>% + .data$soilsurf_ost) %>% distinct %>% arrange(.data$area_code, .data$loc_code,