Skip to content

Commit

Permalink
add value to all .rd
Browse files Browse the repository at this point in the history
apparently non-exported functions needed it too?
  • Loading branch information
gknowlt committed Mar 16, 2021
1 parent 6979905 commit bae9620
Show file tree
Hide file tree
Showing 22 changed files with 78 additions and 15 deletions.
4 changes: 2 additions & 2 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This package was submitted to CRAN on 2021-01-19.
Once it is accepted, delete this file and tag the release (commit 69a85e5).
This package was submitted to CRAN on 2021-03-14.
Once it is accepted, delete this file and tag the release (commit 6979905).
3 changes: 3 additions & 0 deletions R/add_common_aes.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#' for how to modify this.
#' @param ... further arguments to plot.
#' This is not used by \code{dampack} but required for generic consistency.
#' @return a \code{ggplot2} plot updated with a common aesthetic
#'
#' @import ggplot2
#' @keywords internal
Expand Down Expand Up @@ -104,6 +105,7 @@ add_common_aes <- function(gplot, txtsize, scale_name = waiver(),
#' used to automatically label continuous scales
#' @keywords internal
#' @param x axis breaks
#' @return a character vector giving a label for each input value
labfun <- function(x) {
if (any(x > 999, na.rm = TRUE)) {
comma(x)
Expand All @@ -120,6 +122,7 @@ labfun <- function(x) {
#' \code{ggplot2} plots. Non-integer values are rounded down.
#' @section Details:
#' Based on function \code{pretty}.
#' @return a vector of axis-label breaks
#' @keywords internal
number_ticks <- function(n) {
function(limits) {
Expand Down
2 changes: 1 addition & 1 deletion R/calculate_outcome.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' @param cost data frame with costs
#' @param effect data frame with effects
#' @param wtp willingness-to-pay threshold
#'
#' @return a data.frame of the desired outcome values for each strategy
#' @keywords internal
calculate_outcome <- function(outcome = c("nhb", "nmb", "eff", "cost", "nhb_loss",
"nmb_loss", "nhb_loss_voi", "nmb_loss_voi"),
Expand Down
2 changes: 2 additions & 0 deletions R/create_sa.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#' in the \code{\link{make.names}} help page, to avoid unexpected errors.
#'
#' @param currency symbol for the currency being used (ex. "$", "£")
#' @return returns "sa" sensitivity analysis object.
#' @keywords internal
create_sa <- function(parameters, parnames, effectiveness, strategies,
cost, currency, other_outcome) {
# checks that each is a dataframe
Expand Down
6 changes: 4 additions & 2 deletions R/evsi.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ calc_evsi <- function(psa,
#' @param object gam object
#' @param n scalar or vector of new sample size to compute evsi on
#' @param n0 scalar or vector of effective prior sample size
#' @return the conditional loss associated with a gam, effective prior sample size,
#' and new sample size
#' @importFrom stats coef
predict_ga <- function(object, n, n0) {
# Name of parameters
Expand Down Expand Up @@ -191,7 +193,7 @@ predict_ga <- function(object, n, n0) {
#' basis functions of a smooth for one parameter
#'
#' @keywords internal
#'
#' @return Pre-posterior for each basis function
#' @importFrom mgcv PredictMat
predict_smooth_ga <- function(object, param_vals, vrf = 1) {
# Produce basis functions for one parameter
Expand Down Expand Up @@ -219,7 +221,7 @@ predict_smooth_ga <- function(object, param_vals, vrf = 1) {
#' the tensor product if more than one parameter is selected
#' (Heavily based on function Predict.matrix.tensor.smooth from
#' mgcv package)
#'
#' @return tensor product based on list of pre-posterior distributions
#' @keywords internal
#' @importFrom mgcv tensor.prod.model.matrix Predict.matrix PredictMat
predict_matrix_tensor_smooth_ga <- function(object,
Expand Down
2 changes: 2 additions & 0 deletions R/metamodel.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ metamodel <- function(analysis = c("oneway", "twoway", "multiway"),
#'
#' @importFrom mgcv gam
#' @keywords internal
#' @return a statistical metamodel
#' @inheritParams metamodel
mm_run_reg <- function(analysis, dep, params, dat, type, poly.order, k) {

Expand Down Expand Up @@ -430,6 +431,7 @@ predict.metamodel <- function(object, ranges = NULL, nsamp = 100, ...) {
#' @param nsamp number of points from the range
#' @param psa_paramvals sampled values from the PSA. used to calculate the
#' range if none is supplied
#' @return a vector of parameter values spanning the range specified
#' @keywords internal
make_param_seq <- function(p, ranges, nsamp, psa_paramvals) {
p_range <- ranges[[p]]
Expand Down
7 changes: 6 additions & 1 deletion R/owsa.R
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ owsa_tornado <- function(owsa, return = c("plot", "data"),

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

# check that is owsa object

#' check that object is owsa object
#' @param obj the object to be checked for the owsa class
#' @return returns TRUE if object is "owsa" object and FALSE if not.
#' @keywords internal
is_owsa <- function(obj) {
if (inherits(obj, "owsa")) {
return(TRUE)
Expand Down
1 change: 1 addition & 0 deletions R/run_dsa.R
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ run_twsa_det <- function(params_range, params_basecase, nsamp = 40, FUN, outcome
#' @param tmp_replace values from predetermined DSA samples that will replace some values in \code{tmp_input}
#'
#' @importFrom utils setTxtProgressBar
#' @return output of function defined by \code{user_fun}
#' @keywords internal
wrapper_of_user_model <- function(x, user_fun, param_name,
tmp_input, tmp_replace,
Expand Down
10 changes: 1 addition & 9 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
## Resubmission
This is a resubmission. In this version I have:

* removed the name of the package from the start of the description.

* changed the quotes around package title to undirected quotation marks.

* Added \value to .Rd files regarding exported methods and explained the functions results in the documentation.

* Unwrapped examples previously wrapped with \dontrun{}

* 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!
* Added \value to .Rd files regarding exported methods.

## Test environments
* local Win install, R 4.0.3
Expand Down
3 changes: 3 additions & 0 deletions man/add_common_aes.Rd

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

3 changes: 3 additions & 0 deletions man/calculate_outcome.Rd

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

4 changes: 4 additions & 0 deletions man/create_sa.Rd

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

18 changes: 18 additions & 0 deletions man/is_owsa.Rd

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

3 changes: 3 additions & 0 deletions man/labfun.Rd

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

3 changes: 3 additions & 0 deletions man/make_param_seq.Rd

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

3 changes: 3 additions & 0 deletions man/mm_run_reg.Rd

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

3 changes: 3 additions & 0 deletions man/number_ticks.Rd

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

3 changes: 3 additions & 0 deletions man/offset_trans.Rd

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

4 changes: 4 additions & 0 deletions man/predict_ga.Rd

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

3 changes: 3 additions & 0 deletions man/predict_matrix_tensor_smooth_ga.Rd

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

3 changes: 3 additions & 0 deletions man/predict_smooth_ga.Rd

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

3 changes: 3 additions & 0 deletions man/wrapper_of_user_model.Rd

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

0 comments on commit bae9620

Please sign in to comment.