Skip to content

Commit

Permalink
minor cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-buerkner committed Aug 1, 2023
1 parent 5c09251 commit 97a584a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/backends.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ compile_model <- function(model, backend, ...) {
message("Compiling Stan program...")
}
if (use_threading(threads)) {
if (utils::packageVersion("rstan") >= 2.26) {
if (utils::packageVersion("rstan") >= "2.26") {
threads_per_chain_def <- rstan::rstan_options("threads_per_chain")
on.exit(rstan::rstan_options(threads_per_chain = threads_per_chain_def))
rstan::rstan_options(threads_per_chain = threads$threads)
Expand Down Expand Up @@ -148,7 +148,7 @@ fit_model <- function(model, backend, ...) {

# some input checks and housekeeping
if (use_threading(threads)) {
if (utils::packageVersion("rstan") >= 2.26) {
if (utils::packageVersion("rstan") >= "2.26") {
threads_per_chain_def <- rstan::rstan_options("threads_per_chain")
on.exit(rstan::rstan_options(threads_per_chain = threads_per_chain_def))
rstan::rstan_options(threads_per_chain = threads$threads)
Expand Down

0 comments on commit 97a584a

Please sign in to comment.