From e76a914dd28bec3536385642a3aa7c834c21f937 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 18 Mar 2020 14:10:01 +0100 Subject: [PATCH] actor_fetcher: Updated to tidyr 1.0.0, no longer using preserve, slightly different approach to keeping ids_list, and not removing actorsDetail anymore because it does not exist --- R/actor_fetcher.R | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/R/actor_fetcher.R b/R/actor_fetcher.R index 972c045..aee4291 100644 --- a/R/actor_fetcher.R +++ b/R/actor_fetcher.R @@ -105,10 +105,9 @@ actor_fetcher <- function(out, sent_dict = NULL, cores = 1, localhost = NULL, va ### Unnest out_row to individual actor ids out_row <- out_row %>% - unnest(`_source.computerCodes.actorsDetail`, .preserve = colnames(.)) %>% - unnest(ids, .preserve = colnames(.)) %>% - rename(ids_list = ids) %>% - rename(ids = ids1) %>% + unnest(`_source.computerCodes.actorsDetail`) %>% + mutate(ids_list = ids) %>% + unnest(ids) %>% mutate( pids = str_sub(ids, start = 1, end = -3) ) @@ -166,7 +165,7 @@ actor_fetcher <- function(out, sent_dict = NULL, cores = 1, localhost = NULL, va yearmonthday = strftime(`_source.publication_date`, format = '%Y%m%d'), yearweek = strftime(`_source.publication_date`, format = "%Y%V") ) %>% - select(-`_source.computerCodes.actorsDetail`, + select(#-`_source.computerCodes.actorsDetail`, -`_score`, -`_index`, -`_type`,