Skip to content

Commit

Permalink
cf_partner_summary: return npre and npost separately
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferis committed Aug 27, 2023
1 parent a214b0f commit d98f575
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/partners.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ cf_partner_summary <- function(ids, threshold=1L, partners=c("inputs", "outputs"
select(-dataset) %>%
left_join(qmeta, by = join_spec, suffix=suffix) %>%
group_by(dataset, type.pre, type.post) %>%
summarise(weight=sum(weight), n=n_distinct(.data[[glue("{pfix}_key")]]),
summarise(weight=sum(weight),
npre=n_distinct(pre_key),
npost=n_distinct(post_key),
.groups='drop') %>%
arrange(desc(weight)) %>%
mutate(query=paste0(abbreviate_datasets(dataset),":", .data[[glue("type.{qfix}")]]))
Expand Down

0 comments on commit d98f575

Please sign in to comment.