sent_merger: fixed bug with publication_date and grouper()

master
Erik de Vries 4 years ago
parent f6dfc6711b
commit 64a48e5977

@ -103,7 +103,7 @@ sent_merger <- function(df, actors_meta = NULL, actor_groups = NULL, pos_cutoff
if(!is.null(actor_groups)) { if(!is.null(actor_groups)) {
output <- lapply(actor_groups,grouper, df = df) %>% output <- lapply(actor_groups,grouper, df = df) %>%
rbindlist(.) %>% rbindlist(.) %>%
left_join(text_sent, by="id") %>% left_join(text_sent, by=c("id","publication_date")) %>%
mutate( mutate(
actor.prom = actor.occ/text.sentences, actor.prom = actor.occ/text.sentences,
actor.rel_first = 1-(actor.first/text.sentences), actor.rel_first = 1-(actor.first/text.sentences),

Loading…
Cancel
Save