Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bb70375

Browse files
authored
Merge pull request #478 from humanpred/477-resetting-summary-causes-error-for-pkncasetsummaryreset-true
Warn on use of `PKNCA.set.summary(reset=TRUE)`
2 parents 256b437 + 7a1b8e3 commit bb70375

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ the dosing including dose amount and route.
1515

1616
* `pk.calc.half.life()` now returns also `lambda.z.corrxy`, the correlation between
1717
the time and the log-concentration of the lambda z points.
18+
* `PKNCA.set.summary(reset = TRUE)` warns that it may break the use of
19+
`summary()` (#477)
1820

1921
# PKNCA 0.12.1
2022

R/PKNCA.options.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,8 @@ PKNCA.options.describe <- function(name) {
494494
#' digits to round. If a function, it is expected to return a scalar number
495495
#' or character string with the correct results for an input of either a
496496
#' scalar or a two-long vector.
497-
#' @param reset Reset all the summary instructions
497+
#' @param reset Reset all the summary instructions to no instruction (this is
498+
#' not intended for general use)
498499
#' @returns All current summary settings (invisibly)
499500
#' @seealso [summary.PKNCAresults()]
500501
#' @family PKNCA calculation and summary settings
@@ -512,6 +513,7 @@ PKNCA.options.describe <- function(name) {
512513
PKNCA.set.summary <- function(name, description, point, spread,
513514
rounding=list(signif=3), reset=FALSE) {
514515
if (reset) {
516+
warning("`reset = TRUE` is not intended for general use, summary() may not work after resetting summary instructions")
515517
current <- list()
516518
} else {
517519
current <- get("summary", envir=.PKNCAEnv)

man/PKNCA.set.summary.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)