From 8c5c48e8d458e2abfeebbbd3fc6c31f37825978c Mon Sep 17 00:00:00 2001 From: Pieter Huybrechts <48065851+PietrH@users.noreply.github.com> Date: Mon, 22 Jan 2024 16:11:22 +0100 Subject: [PATCH] remove trailing whitespace so we can use a space to detect multiple values --- src/dwc_mapping.Rmd | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/dwc_mapping.Rmd b/src/dwc_mapping.Rmd index 074640f..ecac498 100644 --- a/src/dwc_mapping.Rmd +++ b/src/dwc_mapping.Rmd @@ -119,6 +119,13 @@ First, we need to clean `Haard vastgesteld = 0; Waarneming onzeker = 1;`. This s input_data %<>% mutate(waarneming = recode(waarneming, "Haard vastgesteld = 0; Waarneming onzeker = 1;" = "Waarneming onzeker = 1;")) ``` +Remove trailing whitespace from waarneming, so we can use `; ` as a way to detect multiple values for this field + +```{r remove trailing whitespace from waarneming} +input_data <- + input_data %>% + mutate(waarneming = stringr::str_trim(waarneming)) +``` Remove occurrences containing multiple type - value pairs information in column `waarneming` (patch until [#23](https://github.com/riparias/rato-occurrences/issues/23) is solved):