Skip to content

Commit

Permalink
update minor typos
Browse files Browse the repository at this point in the history
  • Loading branch information
roninsightrx committed Jul 31, 2024
1 parent f63f5bc commit f8e928c
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion R/define_tdm_init_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' @param def model definition, named recursive list with at least the
#' objects `misc$model_type`, `parameters` and `variables`
#' @return model defintion with `state_init` object added describing how to initializing the compartments.
#' @return model definition with `state_init` object added describing how to initializing the compartments.
#' @keywords internal
define_tdm_init_model <- function(def){
if(!is.null(def$state_init)) {
Expand Down
2 changes: 1 addition & 1 deletion R/get_fixed_parameters.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Get fixed parameters from model defintion.
#' Get fixed parameters from model definition.
#'
#' Get fixed parameters listed in model definition. This function is used when
#' parsing model specifications before the model has been compiled. Please see
Expand Down
2 changes: 1 addition & 1 deletion R/new_ode_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#' @param lib_location install into folder (`--library` argument)
#' @param verbose show more output
#' @param as_is use C-code as-is, don't substitute line-endings or shift indices
#' @param nonmem add nonmem code as attribute to model object
#' @param nonmem add NONMEM code as attribute to model object
#' @param comments comments for model
#' @param version number of library
#' @param quiet passed on to `system2` as setting for stderr and stdout; how to
Expand Down
6 changes: 3 additions & 3 deletions R/sim_core.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' @param sim_object list with design and simulation parameters
#' @param ode ode
#' @param duplicate_t_obs allow duplicate t_obs in output? E.g. for optimal design calculations when t_obs = c(0,1,2,2,3). Default is FALSE.
#' @param t_init time of initization of the ODE system. Usually 0.
#' @param t_init time of initialization of the ODE system. Usually 0.
#' @export
#' @return Data frame with simulation results
sim_core <- function(
Expand All @@ -16,12 +16,12 @@ sim_core <- function(
design = sim_object$design,
par = sim_object$p,
iov_bins = sim_object$iov_bins,
step_size = sim_object$int_step_size)
step_size = sim_object$int_step_size)
out <- data.frame(t = tmp$time, y = tmp$obs, obs_type = tmp$obs_type)
if(duplicate_t_obs) {
# use match to ensure that duplicates in t_obs is possible
# make sure rounding level is same! We use 6 digits in sim.R
out <- out[match(paste(sim_object$obs_type, round(sim_object$t_obs, 6), sep="_"),
out <- out[match(paste(sim_object$obs_type, round(sim_object$t_obs, 6), sep="_"),
paste(out$obs_type, round(out$t, 6), sep = "_")),]
} else {
out <- out[!duplicated(out$t) & out$t %in% sim_object$t_obs,]
Expand Down
2 changes: 1 addition & 1 deletion man/define_tdm_init_model.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/get_fixed_parameters.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/new_ode_model.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/sim_core.Rd

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

2 changes: 1 addition & 1 deletion vignettes/covariates.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The names in the covariate list-object should correspond **exactly** with the na

## Time-varying covariates

Time-varing covariates, such as creatinine values can be implemented easily as well. They just require the additional `times` argument:
Time-varying covariates, such as creatinine values can be implemented easily as well. They just require the additional `times` argument:

```{r timevarying-cov}
covariates <- list(
Expand Down
2 changes: 1 addition & 1 deletion vignettes/model.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pk1 <- new_ode_model(code = "

The input code should adhere to the follow rules:

- the derivaties in the ODE system are defined using `dAdt`
- the derivatives in the ODE system are defined using `dAdt`omputate
- array indices for the derivatives and compartments are indicated with `[ ]`.
Compartments indices can start at either 0 or 1. If the latter, all indices will
be reduced by 1 in the translation to C++ code.
Expand Down
2 changes: 1 addition & 1 deletion vignettes/regimen.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ reg1 <- new_regimen(
)
```

Be careful: if the length of the `amt` vector is not the same as the lenght in `times`, the function will repeat the first `amt` specified. The same goes for the arguments `type`, `cmt`, and `t_inf`.
Be careful: if the length of the `amt` vector is not the same as the length in `times`, the function will repeat the first `amt` specified. The same goes for the arguments `type`, `cmt`, and `t_inf`.

By default, the `new_regimen()` function assumes the dose is given as bolus. If you want to specify that these should be given as infusion, specify the `type` and `t_inf` arguments:

Expand Down

0 comments on commit f8e928c

Please sign in to comment.