add error handling if directories are empty or do not exist
This commit is contained in:
+4
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user