Skip to content

Commit

Permalink
add return values for all pcens_df functions in response to CRAN comm…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
seabbs committed Oct 25, 2024
1 parent 28a3731 commit e723b2b
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 24 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This is the first major release of `primarycensored` and has been submitted to C
- Added `dependencies: "hard"` to the `R-CMD-check` workflow to ensure checks pass without optional dependencies.
- Improved handling of examples that use optional dependencies.
- Check all URLs for redirects.
- Ensure that all functions have documented return values.

# primarycensored 0.6.0

Expand Down
16 changes: 13 additions & 3 deletions R/pcens.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
#'
#' @inheritParams pprimarycensored
#'
#' @return An object of class `pcens_{pdist_name}_{dprimary_name}`
#' @return An object of class `pcens_{pdist_name}_{dprimary_name}`. This
#' contains the primary event distribution, the delay distribution, the
#' delay distribution arguments, and any additional arguments. It can be
#' used with the `pcens_cdf()` function to compute the primary event censored
#' cdf.
#'
#' @family pcens
#'
Expand Down Expand Up @@ -47,7 +51,7 @@ new_pcens <- function(
#' useful for testing purposes or for settings where the analytical solution
#' breaks down.
#'
#' @return Vector of primary event censored CDFs
#' @return Vector of computed primary event censored CDFs
#'
#' @family pcens
#'
Expand Down Expand Up @@ -77,6 +81,8 @@ pcens_cdf <- function(
#'
#' @family pcens
#'
#' @inherit pcens_cdf return
#'
#' @export
pcens_cdf.default <- function(
object, q, pwindow, use_numeric = FALSE) {
Expand Down Expand Up @@ -109,6 +115,8 @@ pcens_cdf.default <- function(
#'
#' @family pcens
#'
#' @inherit pcens_cdf return
#'
#' @export
pcens_cdf.pcens_pgamma_dunif <- function(
object, q, pwindow, use_numeric = FALSE) {
Expand Down Expand Up @@ -182,6 +190,8 @@ pcens_cdf.pcens_pgamma_dunif <- function(
#'
#' @family pcens
#'
#' @inherit pcens_cdf return
#'
#' @export
pcens_cdf.pcens_plnorm_dunif <- function(
object, q, pwindow, use_numeric = FALSE) {
Expand Down Expand Up @@ -252,7 +262,7 @@ pcens_cdf.pcens_plnorm_dunif <- function(
#'
#' @inheritParams pcens_cdf
#'
#' @family pcens
#' @inherit pcens_cdf return
#'
#' @export
pcens_cdf.pcens_pweibull_dunif <- function(
Expand Down
4 changes: 4 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
0 errors | 0 warnings | 1 note

* This is a new release.

## Comments

- Ensured that all `pcens_cdf()` functions have documented return values.
9 changes: 6 additions & 3 deletions man/new_pcens.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions man/pcens_cdf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/pcens_cdf.default.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/pcens_cdf.pcens_pgamma_dunif.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/pcens_cdf.pcens_plnorm_dunif.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 3 additions & 9 deletions man/pcens_cdf.pcens_pweibull_dunif.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e723b2b

Please sign in to comment.