Skip to content

Commit

Permalink
Update CI_2_Generate_warnings.R
Browse files Browse the repository at this point in the history
  • Loading branch information
markus1bauer committed Apr 19, 2024
1 parent 69139a0 commit 46b2d5c
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions R/CI_2_Generate_warnings.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,5 @@ library(tibble)
library(tidyr)

### Start ###
rm(list = ls())


#### Load files ####

path <- file.path(here("testthat", "warnings_file.csv"))
if(file.exists(path)) warning_file <- read.csv(path)


# write warning messages ####

warning_messages <- c(
"unhealthy_but_wrong_status" = "There are living trees that are unhealthy but status is not AU.",
"wounded_level_but_wrong_status_or_FAD" = "There are trees with wounded level but no W in FAD."
)


# check if files exist and generate a plot with the warning ####


if(exists("warning_file"))
all_warns <- paste(
c(
"WARNINGS!!!\n",
warning_messages[unique(warning_file$warning_name)],
"CLICK HERE TO GO TO FOLDER"
),
collapse = "\n"
) else all_warns = "No WARNINGS"

0 comments on commit 46b2d5c

Please sign in to comment.