Skip to content

Commit bae9620

Browse files
committed
add value to all .rd
apparently non-exported functions needed it too?
1 parent 6979905 commit bae9620

22 files changed

+78
-15
lines changed

CRAN-RELEASE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
This package was submitted to CRAN on 2021-01-19.
2-
Once it is accepted, delete this file and tag the release (commit 69a85e5).
1+
This package was submitted to CRAN on 2021-03-14.
2+
Once it is accepted, delete this file and tag the release (commit 6979905).

R/add_common_aes.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#' for how to modify this.
2121
#' @param ... further arguments to plot.
2222
#' This is not used by \code{dampack} but required for generic consistency.
23+
#' @return a \code{ggplot2} plot updated with a common aesthetic
2324
#'
2425
#' @import ggplot2
2526
#' @keywords internal
@@ -104,6 +105,7 @@ add_common_aes <- function(gplot, txtsize, scale_name = waiver(),
104105
#' used to automatically label continuous scales
105106
#' @keywords internal
106107
#' @param x axis breaks
108+
#' @return a character vector giving a label for each input value
107109
labfun <- function(x) {
108110
if (any(x > 999, na.rm = TRUE)) {
109111
comma(x)
@@ -120,6 +122,7 @@ labfun <- function(x) {
120122
#' \code{ggplot2} plots. Non-integer values are rounded down.
121123
#' @section Details:
122124
#' Based on function \code{pretty}.
125+
#' @return a vector of axis-label breaks
123126
#' @keywords internal
124127
number_ticks <- function(n) {
125128
function(limits) {

R/calculate_outcome.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#' @param cost data frame with costs
55
#' @param effect data frame with effects
66
#' @param wtp willingness-to-pay threshold
7-
#'
7+
#' @return a data.frame of the desired outcome values for each strategy
88
#' @keywords internal
99
calculate_outcome <- function(outcome = c("nhb", "nmb", "eff", "cost", "nhb_loss",
1010
"nmb_loss", "nhb_loss_voi", "nmb_loss_voi"),

R/create_sa.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#' in the \code{\link{make.names}} help page, to avoid unexpected errors.
2121
#'
2222
#' @param currency symbol for the currency being used (ex. "$", "£")
23+
#' @return returns "sa" sensitivity analysis object.
24+
#' @keywords internal
2325
create_sa <- function(parameters, parnames, effectiveness, strategies,
2426
cost, currency, other_outcome) {
2527
# checks that each is a dataframe

R/evsi.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ calc_evsi <- function(psa,
120120
#' @param object gam object
121121
#' @param n scalar or vector of new sample size to compute evsi on
122122
#' @param n0 scalar or vector of effective prior sample size
123+
#' @return the conditional loss associated with a gam, effective prior sample size,
124+
#' and new sample size
123125
#' @importFrom stats coef
124126
predict_ga <- function(object, n, n0) {
125127
# Name of parameters
@@ -191,7 +193,7 @@ predict_ga <- function(object, n, n0) {
191193
#' basis functions of a smooth for one parameter
192194
#'
193195
#' @keywords internal
194-
#'
196+
#' @return Pre-posterior for each basis function
195197
#' @importFrom mgcv PredictMat
196198
predict_smooth_ga <- function(object, param_vals, vrf = 1) {
197199
# Produce basis functions for one parameter
@@ -219,7 +221,7 @@ predict_smooth_ga <- function(object, param_vals, vrf = 1) {
219221
#' the tensor product if more than one parameter is selected
220222
#' (Heavily based on function Predict.matrix.tensor.smooth from
221223
#' mgcv package)
222-
#'
224+
#' @return tensor product based on list of pre-posterior distributions
223225
#' @keywords internal
224226
#' @importFrom mgcv tensor.prod.model.matrix Predict.matrix PredictMat
225227
predict_matrix_tensor_smooth_ga <- function(object,

R/metamodel.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ metamodel <- function(analysis = c("oneway", "twoway", "multiway"),
135135
#'
136136
#' @importFrom mgcv gam
137137
#' @keywords internal
138+
#' @return a statistical metamodel
138139
#' @inheritParams metamodel
139140
mm_run_reg <- function(analysis, dep, params, dat, type, poly.order, k) {
140141

@@ -430,6 +431,7 @@ predict.metamodel <- function(object, ranges = NULL, nsamp = 100, ...) {
430431
#' @param nsamp number of points from the range
431432
#' @param psa_paramvals sampled values from the PSA. used to calculate the
432433
#' range if none is supplied
434+
#' @return a vector of parameter values spanning the range specified
433435
#' @keywords internal
434436
make_param_seq <- function(p, ranges, nsamp, psa_paramvals) {
435437
p_range <- ranges[[p]]

R/owsa.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ owsa_tornado <- function(owsa, return = c("plot", "data"),
213213

214214
#' transformation for owsa_tornado
215215
#' @param offset the offset for the transformation (kind of the new 0)
216+
#' @return offset value supplied to ytrans in \code{add_common_aes}
216217
#' @keywords internal
217218
#' @importFrom scales trans_new
218219
offset_trans <- function(offset = 0) {
@@ -322,7 +323,11 @@ owsa_opt_strat <- function(owsa, params = NULL, maximize = TRUE,
322323
}
323324
}
324325

325-
# check that is owsa object
326+
327+
#' check that object is owsa object
328+
#' @param obj the object to be checked for the owsa class
329+
#' @return returns TRUE if object is "owsa" object and FALSE if not.
330+
#' @keywords internal
326331
is_owsa <- function(obj) {
327332
if (inherits(obj, "owsa")) {
328333
return(TRUE)

R/run_dsa.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ run_twsa_det <- function(params_range, params_basecase, nsamp = 40, FUN, outcome
341341
#' @param tmp_replace values from predetermined DSA samples that will replace some values in \code{tmp_input}
342342
#'
343343
#' @importFrom utils setTxtProgressBar
344+
#' @return output of function defined by \code{user_fun}
344345
#' @keywords internal
345346
wrapper_of_user_model <- function(x, user_fun, param_name,
346347
tmp_input, tmp_replace,

cran-comments.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
## Resubmission
22
This is a resubmission. In this version I have:
33

4-
* removed the name of the package from the start of the description.
5-
6-
* changed the quotes around package title to undirected quotation marks.
7-
8-
* Added \value to .Rd files regarding exported methods and explained the functions results in the documentation.
9-
10-
* Unwrapped examples previously wrapped with \dontrun{}
11-
12-
* removed write.table() and ggsave() function uses from the basic_cea.rmd vignette to comply with CRAN's policies. These were the only offending functions I could find--if there are others that I am overlooking, please let me know and I will happily fix them!
4+
* Added \value to .Rd files regarding exported methods.
135

146
## Test environments
157
* local Win install, R 4.0.3

man/add_common_aes.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)