From d0601d2aa7898b0b5ef32146bc72ef366d1e8e56 Mon Sep 17 00:00:00 2001 From: Erik de Vries Date: Tue, 25 Jun 2019 19:43:35 +0200 Subject: [PATCH] actor_fetcher: added minimum verbosity to identify cases in which an actor is present without a party mention --- R/actor_fetcher.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/actor_fetcher.R b/R/actor_fetcher.R index f42609c..781483e 100644 --- a/R/actor_fetcher.R +++ b/R/actor_fetcher.R @@ -59,7 +59,7 @@ actor_fetcher <- function(out, sent_dict = NULL, cores = 1, localhost = NULL, va ) ) } else { - print(id) + print(paste0('id:',id)) return(NULL) } } @@ -108,7 +108,8 @@ actor_fetcher <- function(out, sent_dict = NULL, cores = 1, localhost = NULL, va ### Get list of party ids occuring more than once in the document pids_table <- table(out_row$pids) - dupe_pids <- names(pids_table[pids_table > 1]) + dupe_pids <- names(pids_table[pids_table > 1])%>% + str_subset(pattern = fixed('P_')) single_pids <- names(pids_table[pids_table <= 1]) %>% str_subset(pattern = fixed('P_')) ### Data frame containing only duplicate party ids