-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
This works:
galah_call() |>
filter(year == 2025) |>
atlas_counts(type = "species")
# A tibble: 1 × 1
count
<int>
1 35292
But this doesn't:
galah_call() |>
filter(year == 2025) |>
group_by(cl22) |>
atlas_counts(type = "species")
Error in `dplyr::bind_cols()` at galah-R/R/collect_species_count.R:9:5:
! Can't recycle `..1` (size 11) to match `..2` (size 3).
Run `rlang::last_trace()` to see where the error occurred.
This could be viewed as a simple bug, but there might be a deeper problem here in that recent versions use group_by(speciesID) as equivalent to atlas_species(). This leads to a problem where we are effectively using group_by() twice, to do different things:
- once to tell us the number of categories present (species)
- another to give the levels of categories (states and territories)
Given that these are distinct operations, this suggests that group_by() isn't solely the solution, and something more dplyr-like might be needed to distinguish them. Not sure what that looks like rn but might involve summarise.data_request() or similar.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working