add error handling if directories are empty or do not exist

This commit is contained in:
2021-06-29 18:10:03 +02:00
parent 574480a9bb
commit a86ddfec83
3 changed files with 41 additions and 3 deletions
+4 -1
View File
@@ -23,6 +23,7 @@ collect_unique <- function(xs) xs %>% clear_na() %>% unique() %>% str_c(collapse
# expects a tibble of redner and repairs
repair_redner <- function(redner) {
if (nrow(redner) == 0) return(redner)
redner %>% mutate(fraktion = Vectorize(repair_fraktion)(fraktion)) %>% # fix fraktion
group_by(id, vorname, nachname) %>%
summarize(fraktion = collect_unique(fraktion),
@@ -32,16 +33,18 @@ repair_redner <- function(redner) {
}
repair_reden <- function(reden) {
if (nrow(reden) == 0) return(reden)
# TODO: fill with content
reden
}
repair_talks <- function(talks) {
if (nrow(talks) == 0) return(talks)
# TODO: fill with content
talks
}
#' Repairs parsed tables
#' Repair parsed tables
#'
#' @export
repair <- function(parse_output) {