Skip to content

Commit

Permalink
No margin for error
Browse files Browse the repository at this point in the history
  • Loading branch information
zsusswein committed Oct 15, 2024
1 parent dc724a8 commit 12765cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/fit_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ format_right_truncation <- function(pmf, data) {
# silently removed if length of the PMF was longer than the data,
# effectively eliminating the right-truncation correction

trunc_len <- nrow(data) - 1
trunc_len <- nrow(data)
cli::cli_warn(
c(
"Removing right-truncation PMF elements after {.val {trunc_len}}",
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/fit_model.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Right truncation longer than data throws error

Removing right-truncation PMF elements after 1
Removing right-truncation PMF elements after 2
Right truncation PMF longer than the data
PMF length: 3
Data length: 2
Expand Down

0 comments on commit 12765cd

Please sign in to comment.