Skip to content

Commit

Permalink
Version 0.2.6: redo soilsurf_ost calculation in get_locs() *
Browse files Browse the repository at this point in the history
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().
  • Loading branch information
florisvdh committed Feb 28, 2020
1 parent 752ae34 commit 8bffed5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
7 changes: 4 additions & 3 deletions R/get.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 8bffed5

Please sign in to comment.