Skip to content

Commit

Permalink
Make sure group_by is distinct
Browse files Browse the repository at this point in the history
  • Loading branch information
cchristiansen committed Jul 27, 2023
1 parent faf793f commit 1ef0fa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aggregation/aggregate_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ vector_groupby_count_zones <- function(data, grouping_cols){
if (!"zone" %in% grouping_cols) {grouping_cols <- c(grouping_cols, "zone")}
grouping_cols <- grouping_cols[grouping_cols != "c_id"]
add_cols <- grouping_cols[!grouping_cols %in% c("clean", "zone")]
grouping_cols <- c(grouping_cols, add_cols)
grouping_cols <- unique(c(grouping_cols, add_cols))
data <- group_by(data, .dots=grouping_cols)
data <- summarise(data , sample_count=length(unique(c_id)))
data$series_x <- do.call(paste, c(data[c("clean", "zone")], sep = "-" ))
Expand Down

0 comments on commit 1ef0fa3

Please sign in to comment.