Skip to content

Commit

Permalink
::document() fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Sep 26, 2023
1 parent 5236b9a commit 86aead6
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 96 deletions.
8 changes: 4 additions & 4 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ etTrans <- function(inData, obj, addCmt = FALSE, dropUnits = FALSE, allTimeVar =
#' @param c1 character vector of items to be expanded
#' @param c2 second character vector of items to be expanded
#' @param type 0 for a typical data frame, 1 for symengine sensitivity expansion
#' @return data frame (when type = 0) or symengine string (when type=1)
#' @return data frame (when type = 0) or symengine string (when type=1)
#' @export
#' @keywords internal
rxExpandGrid_ <- function(c1, c2, type) {
Expand Down Expand Up @@ -73,7 +73,7 @@ rxExpandSens2_ <- function(state, s1, s2) {
#'
#' @param state is the state to expand
#' @param neta is the number of etas
#' @param pred type of prediction
#' @param pred type of prediction
#' @keywords internal
#' @return String of symengine expressions to evaluate to calculate df/deta
#' @export
Expand All @@ -83,7 +83,7 @@ rxExpandFEta_ <- function(state, neta, pred) {

#' Rep R0 for foce
#'
#' @param number ETA to substitute
#' @param neta ETA to substitute
#'
#' @return Returns a string of R code to substitute the rx_r expression in the symengine environment .s
#'
Expand Down Expand Up @@ -259,7 +259,7 @@ rxSetupIni <- function(obj, inits = NULL) {
#'
#' @param obj rxode2 object
#'
#' @param inits A numeric vector of initial conditions.
#' @param scale A numeric vector scales
#'
#' @param extraArgs A list of extra args to parse for initial conditions.
#'
Expand Down
23 changes: 11 additions & 12 deletions R/err.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"f"=2:3,
"dgeom"=1,
"geom"=1,
# "dhyper"=3,
# "hyper"=3,
# "dhyper"=3,
# "hyper"=3,
"dunif"=0:2,
"unif"=0:2,
"dweibull"=1:2,
Expand Down Expand Up @@ -235,7 +235,7 @@ rxPreferredDistributionName <- function(dist) {
}

.rxTransformHasBounds <- function(distribution) {
(as.integer(distribution) %in% 5:14)
(as.integer(distribution) %in% 5:14)
}

.rxAddPropLevels <- c(
Expand Down Expand Up @@ -337,7 +337,7 @@ rxDemoteAddErr <- function(errType) {

.incompatibleErr <- function(err1, err2) {
.errs <- sort(c(err1, err2))
paste0("`", .errs[1], "` and `", .errs[2], "` are incompatible")
paste0("`", .errs[1], "` and `", .errs[2], "` are incompatible")
}
#' Combine error types to get the model F type
#'
Expand Down Expand Up @@ -548,12 +548,11 @@ rxDemoteAddErr <- function(errType) {
#' `oldErrType` to zero assuming that there is no prior
#' distribution.
#'
#' @param newTransform This is the new distribution that is being
#' @param newErrType This is the new distribution that is being
#' "added" to the current transformation. These assumes the inputs
#' are in the preferred distribution name, as determined by
#' `rxPreferredDistributionName()`
#'
#'
#' @return The new transformation as a factor
#'
#' @author Matthew Fidler
Expand Down Expand Up @@ -601,7 +600,7 @@ rxErrTypeCombine <- function(oldErrType, newErrType) {
env$.numeric <- -(expression[[2]])
return(TRUE)
} else if (identical(expression[[1]], quote(`+`)) &&
is.numeric(expression[[2]])) {
is.numeric(expression[[2]])) {
env$.numeric <- expression[[2]]
return(TRUE)
}
Expand Down Expand Up @@ -632,7 +631,7 @@ rxErrTypeCombine <- function(oldErrType, newErrType) {
dexp=c("a"), #7
f=c("a", "b", "c"), #8
geom=c("a"), #9
# hyper=c("a", "b", "c"), #10
# hyper=c("a", "b", "c"), #10
unif=c("a", "b"), #11
weibull=c("a", "b"), #12
cauchy=c("a", "b"),
Expand Down Expand Up @@ -1189,7 +1188,7 @@ rxErrTypeCombine <- function(oldErrType, newErrType) {
setNames(
c("linCmtA" = 1L, "linCmtB" = 2L,
"linCmtC" = 3L
)[match.arg(linCmtSens)],
)[match.arg(linCmtSens)],
NULL
), verbose
))
Expand Down Expand Up @@ -1263,8 +1262,8 @@ rxErrTypeCombine <- function(oldErrType, newErrType) {
}
.mod <- eval(parse(text=paste0("quote({", .var, "=1+2\n", deparse1(expr), "})")))
.ini <- as.data.frame(eval(parse(text=paste0("lotri({\n",
paste(paste(allNames(expr[[3]]), "<- 1"), collapse="\n"),
"\n})"))))
paste(paste(allNames(expr[[3]]), "<- 1"), collapse="\n"),
"\n})"))))
.env <- try(.errProcessExpression(.mod, .ini, checkMissing=FALSE), silent=TRUE)
if (inherits(.env, "try-error")) return(FALSE)
if (uiEnv) return(.env)
Expand All @@ -1273,7 +1272,7 @@ rxErrTypeCombine <- function(oldErrType, newErrType) {
#' Is Normal, Cauchy or t distribution model specification?
#'
#' @param expr Expression
#'
#'
#' @return TRUE if this is a normal/t/cauchy model, FALSE otherwise
#' @author Matthew L. Fidler
#' @noRd
Expand Down
1 change: 0 additions & 1 deletion man/reexports.Rd

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

2 changes: 1 addition & 1 deletion man/rxErrTypeCombine.Rd

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

2 changes: 1 addition & 1 deletion man/rxRepR0_.Rd

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

4 changes: 2 additions & 2 deletions man/rxSetupScale.Rd

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

Loading

0 comments on commit 86aead6

Please sign in to comment.