Skip to content

Commit

Permalink
Corrected inclusion of deSolve package for here-be-dragons vignette.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tess-LaCoil committed Dec 2, 2024
1 parent c907a8e commit 12d197f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Imports:
RcppParallel (>= 5.0.1),
rlang,
rstan (>= 2.18.1),
rstantools (>= 2.3.1.1)
rstantools (>= 2.3.1.1),
deSolve
LinkingTo:
BH (>= 1.66.0),
Rcpp (>= 0.12.0),
Expand Down
2 changes: 1 addition & 1 deletion R/hmde-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
#' @import methods
#' @import Rcpp
#' @import dplyr
#' @import deSolve
#' @importFrom rstan sampling
#' @importFrom rstantools rstan_config
#' @importFrom RcppParallel RcppParallelLibs
#' @importFrom stats median
#' @importFrom deSolve ode
#'
#' @references
#' Stan Development Team (NA). RStan: the R interface to Stan. R package version 2.26.23. https://mc-stan.org
Expand Down
1 change: 0 additions & 1 deletion R/hmde_run.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ hmde_run <- function(model_template, ...) {

# Detect model
out <- switch(model_template$model,
linear = rstan::sampling(stanmodels$linear, data = model_template, ...),
constant_single_ind = rstan::sampling(stanmodels$constant_single_ind, data = model_template, ...),
constant_multi_ind = rstan::sampling(stanmodels$constant_multi_ind, data = model_template, ...),
canham_single_ind = rstan::sampling(stanmodels$canham_single_ind, data = model_template, ...),
Expand Down
2 changes: 2 additions & 0 deletions vignettes/here_be_dragons.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ knitr::opts_chunk$set(
options(rmarkdown.html_vignette.check_title = FALSE)
```

## Load dependencies
```{r}
#remotes::install_github("traitecoevo/hmde@a93e02e48657bb648378f584c4a2166d38fea263", force = TRUE)
library(hmde)
library(dplyr)
library(ggplot2)
library(deSolve)
```

This vignette demonstrates an interaction between errors from numerical integration methods and MCMC sampling. The underlying issue is that if, given errors in the chosen numerical integration method, two sets of parameters for a differential equation $f$ give "the same" (more in a second) output for
Expand Down

0 comments on commit 12d197f

Please sign in to comment.