Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/model-recruitment.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ model_data_recruitment <- function(
if (any(placeholder)) {
unobserved_years <- caribou_year(
data$Year[placeholder],
year_start,
ifelse("Month" %in% colnames(data), year_start - 1, year_start),
year_start = year_start
)
if (!quiet) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/plot-month/plot_month_predict_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/plot-month/plot_month_predict_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/plot-month/plot_month_survival.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/plot-month/plot_month_survival_ml.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/plot-year-growth/plot_year_growth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/plot-year-recruitment/dataframe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/plot-year-recruitment/dataframe_ml.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/plot-year-recruitment/recruitment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/plot-year/plot_year_multi.png
Binary file modified tests/testthat/_snaps/plot-year/plot_year_predict_0.png
Binary file modified tests/testthat/_snaps/plot-year/plot_year_predict_1.png
Binary file modified tests/testthat/_snaps/plot-year/plot_year_recruitment.png
Binary file modified tests/testthat/_snaps/plot-year/plot_year_recruitment_ml.png
Binary file modified tests/testthat/_snaps/plot-year/plot_year_survival.png
Binary file modified tests/testthat/_snaps/plot-year/plot_year_survival_ml.png
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PopulationName,CaribouYear,Month,estimate,lower,upper
A,2020,NA,0.112,0.0485,0.201
A,2021,NA,0.0522,0.021,0.116
A,2022,NA,0.0208,0.00716,0.0555
A,2019,NA,0.112,0.0485,0.201
A,2020,NA,0.0522,0.021,0.116
A,2021,NA,0.0208,0.00716,0.0555
3 changes: 2 additions & 1 deletion tests/testthat/test-prior-only.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ test_that("bb_fit_recruitment works with prior-only data", {
pred <- bb_predict_recruitment(fit)
expect_s3_class(pred, "tbl_df")
expect_gt(nrow(pred), 0)
expect_true(all(pred$CaribouYear %in% 2020:2022))
# CaribouYear is one less than year because recruitment survey happens spring after
expect_true(all(pred$CaribouYear %in% 2019:2021))
expect_snapshot_data(pred, "recruitment_pred_prior_only")
})

Expand Down
Loading