Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow zero follow-up times in DataDA objects. #851

Merged
merged 11 commits into from
Sep 30, 2024
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: crmPack
Title: Object-Oriented Implementation of CRM Designs
Version: 2.0.0.9160
Version: 2.0.0
Authors@R: c(
person("Daniel", "Sabanes Bove", , "[email protected]", role = c("aut", "cre")),
person("Wai", "Yin Yeung", , "[email protected]", role = "aut"),
Expand Down Expand Up @@ -32,8 +32,8 @@ Description: Implements a wide range of model-based dose escalation
form in the S4 class system, making it very flexible for adaptation to
new models, escalation or stopping rules. Further details are
presented in Sabanes Bove et al. (2019) <doi:10.18637/jss.v089.i10>.
License: GPL (>= 2)
URL: https://github.com/openpharma/crmPack
License: GPL (>= 2)
URL: https://github.com/openpharma/crmPack, https://openpharma.github.io/crmPack/
BugReports: https://github.com/openpharma/crmPack/issues
Depends:
ggplot2 (>= 2.0.0),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Version 2.0.0.9160
# Version 2.0.0
* **Note: This release (1.0 -> 2.0) signifies a major breaking revamp of the package.** Users are advised to carefully review the release notes and documentation for detailed information on the changes and any necessary updates to their existing code.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no worries about fixing this now, because the version bump action in GHA will change this again. we can just do it at the end before the CRAN release

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version mismatch caused an error in the version check job of the CI.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, then please adjust the DESCRIPTION version instead of the NEWS version

* Implemented `knit_print` methods for almost all `crmPack` classes to improve rendering in Markdown and Quarto documents. See the vignette for more details.
* Provided basic support for ordinal CRM models. See the vignette for more details.
Expand Down
4 changes: 2 additions & 2 deletions R/Data-validity.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ v_data_da <- function(object) {
}
v$check(
test_numeric(object@u, upper = object@Tmax, len = object@nObs, any.missing = FALSE) &&
all(object@u > 0),
"u must be of type double, nObs length, non-negative and not greater than Tmax"
all(object@u >= 0),
"u must be of type double, nObs length, non-negative, not missing and not greater than Tmax"
)
v$check(
test_numeric(object@t0, lower = 0, len = object@nObs, any.missing = FALSE, sorted = TRUE),
Expand Down
32 changes: 16 additions & 16 deletions tests/testthat/_snaps/Design-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@
result
Output
An object of class "PseudoDualSimulations"
Slot "fitEff":
Slot "fit_eff":
[[1]]
[[1]]$theta1
[1] -4.20662
Expand All @@ -619,13 +619,13 @@



Slot "FinalGstarEstimates":
Slot "final_gstar_estimates":
[1] 146.2479

Slot "FinalGstarAtDoseGrid":
Slot "final_gstar_at_dose_grid":
[1] 125

Slot "FinalGstarCIs":
Slot "final_gstar_cis":
[[1]]
[[1]]$lower
[1] 75.03531
Expand All @@ -635,16 +635,16 @@



Slot "FinalGstarRatios":
Slot "final_gstar_ratios":
[1] 3.798815

Slot "FinalOptimalDose":
Slot "final_optimal_dose":
[1] 137.5996

Slot "FinalOptimalDoseAtDoseGrid":
Slot "final_optimal_dose_at_dose_grid":
[1] 125

Slot "sigma2est":
Slot "sigma2_est":
[1] 0.1616952

Slot "fit":
Expand Down Expand Up @@ -765,7 +765,7 @@
result
Output
An object of class "PseudoDualSimulations"
Slot "fitEff":
Slot "fit_eff":
[[1]]
middle lower upper
1 -0.3079474 -0.8521410 0.08196096
Expand All @@ -782,13 +782,13 @@
12 1.6915134 1.2623492 2.22318756


Slot "FinalGstarEstimates":
Slot "final_gstar_estimates":
[1] 300

Slot "FinalGstarAtDoseGrid":
Slot "final_gstar_at_dose_grid":
[1] 225

Slot "FinalGstarCIs":
Slot "final_gstar_cis":
[[1]]
[[1]]$lower
[1] 300
Expand All @@ -798,16 +798,16 @@



Slot "FinalGstarRatios":
Slot "final_gstar_ratios":
[1] 1

Slot "FinalOptimalDose":
Slot "final_optimal_dose":
[1] 62.78087

Slot "FinalOptimalDoseAtDoseGrid":
Slot "final_optimal_dose_at_dose_grid":
[1] 50

Slot "sigma2est":
Slot "sigma2_est":
[1] 0.2648646

Slot "fit":
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-Data-validity.R
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ test_that("v_data_da: error for u of wrong length and values", {

expect_equal(
v_data_da(object),
"u must be of type double, nObs length, non-negative and not greater than Tmax" # nolintr
"u must be of type double, nObs length, non-negative, not missing and not greater than Tmax" # nolintr
)
})

Expand Down
Loading