`table_biomass_abundance_catch` fails tests due to change in `example_data`
I maintainer di solito rispondono entro 2 giorni
@Schiano-NOAA ci sta già lavorando.
Dal 30/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
A change in the format of example_data introduced in https://github.com/nmfs-ost/stockplotr/commit/e74daf8cb3e7d3ab050f746209e1fb11f00335f7 results in table_biomass_abundance_catch failing. The new example_data results in sex specific values for abundance, which are not being aggregated by the the table function.
I believe the solution is:
if (x == "catch$|landings_observed") {
extra_grouping <- check_grouping(filtered_data)[-grep("year|fleet", check_grouping(filtered_data))]
filtered_data <- filtered_data |>
dplyr::summarise(
estimate = sum(as.numeric(estimate), na.rm = TRUE),
estimate_upper = mean(as.numeric(estimate_upper), na.rm = TRUE),
estimate_lower = mean(as.numeric(estimate_lower), na.rm = TRUE),
uncertainty_label = unique(uncertainty_label),
uncertainty = mean(uncertainty, na.rm = TRUE),
.by = c(year, model, label)
) # |>
# dplyr::ungroup()
} else if (x == "^abundance") {
extra_grouping <- check_grouping(filtered_data)[-grep("year|sex", check_grouping(filtered_data))]
filtered_data <- filtered_data |>
dplyr::summarise(
estimate = sum(as.numeric(estimate), na.rm = TRUE),
estimate_upper = mean(as.numeric(estimate_upper), na.rm = TRUE),
estimate_lower = mean(as.numeric(estimate_lower), na.rm = TRUE),
uncertainty_label = unique(uncertainty_label),
uncertainty = mean(uncertainty, na.rm = TRUE),
.by = c(year, model, label)
) # |>
# dplyr::ungroup()
} else {
extra_grouping <- check_grouping(filtered_data)[-grep("year", check_grouping(filtered_data))]
}
specifically, the introduction of the else if (x=="^abundance") conditional.
If this fix is not desired, reverting the above commit leads to this function working as previously and all associated tests passing.
- Lingua principale
- R
- Stelle
- 20
- Fork
- 10
- Merge medio
- 3g 19h
- PR unite (30g)
- 23
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nmfs-ost/stockplotr
-
check `dat` argument (and others) at the start of save_all_plots()Forse già presa @Schiano-NOAA l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
nmfs-ost/stockplotr#445 · 7 commenti · 2 reazioni · 2 assegnatari ·
I maintainer di solito rispondono entro 2 giorni
-
[bug] plot_spawning_potential_ratio() example throwing errorForse già presa @JZahner1 l’ha presa 5 giorni fa. Aperta
nmfs-ost/stockplotr#444 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Release Checklist - Monthly UpdateForse già presa @Schiano-NOAA l’ha presa 5 giorni fa. Aperta
nmfs-ost/stockplotr#442 · 2 assegnatari ·
I maintainer di solito rispondono entro 2 giorni
-
Brainstorm ways to automatically update `save_all_plots()`Forse già presa @sbreitbart-NOAA l’ha presa 12 giorni fa. Aperta
nmfs-ost/stockplotr#432 · 4 commenti · 2 assegnatari ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
nmfs-ost/stockplotr#422 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di nmfs-ost/stockplotr
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
microsoft/ML-For-Beginners#1061 ·
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
PecanProject/pecan#4218 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
HenrikBengtsson/R.matlab#61 ·
-
easy first-contributor first-contributors good first issue help wanted r up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
fork-commit-merge/fork-commit-merge#8524 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
waldronlab/bedbaser#27 ·