Skip to content

Commit

Permalink
update for rstan tools
Browse files Browse the repository at this point in the history
  • Loading branch information
ericward-noaa committed Sep 11, 2023
1 parent ba10aa7 commit c9a53a4
Show file tree
Hide file tree
Showing 10 changed files with 1,746 additions and 1,215 deletions.
2 changes: 0 additions & 2 deletions CRAN-RELEASE

This file was deleted.

6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 1.1.0
Date: 2022-02-09 16:29:23 UTC
SHA: b21d92a5ae04e0190728231bf84d3529c758df21
Version: 1.2.0
Date: 2023-09-11 22:08:20 UTC
SHA: ba10aa7dd9c9ea57675350652ba4e2bf4df1b7cf
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: zoid
Title: Bayesian Zero-and-One Inflated Dirichlet Regression Modelling
Version: 1.1.0
Version: 1.2.0
Authors@R:
c(person(given = "Eric J.",
family = "Ward",
Expand Down Expand Up @@ -37,16 +37,16 @@ License: GPL (>=3)
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
Biarch: true
URL: https://nwfsc-cb.github.io/zoid/
BugReports: https://github.com/nwfsc-cb/zoid/issues
Depends:
R (>= 3.4.0)
Imports:
methods,
gtools,
compositions,
gtools,
methods,
Rcpp (>= 0.12.0),
RcppParallel (>= 5.0.1),
rstan (>= 2.26.0),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# zoid 1.2.0

* Updated Stan code to reflect changes needed to be compatible with Stan 2.26 (arrays)

# zoid 1.1.0

* Changed treatment of zeros in Stan model. Package consistent with Jensen et al. (in review)
Expand Down
2 changes: 1 addition & 1 deletion R/fit_prior.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fit_prior <- function(n_bins, n_draws = 10000, target = 1 / n_bins, iterations =
n_draws = n_draws,
method = "BFGS"
), silent = TRUE)
if (class(o) != "try-error") {
if(!identical(class(o), "try-error")) {
if (o$value < best) {
best <- o$value
best_value <- list(
Expand Down
4 changes: 2 additions & 2 deletions src/Makevars
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
STANHEADERS_SRC = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "message()" -e "cat(system.file('include', 'src', package = 'StanHeaders', mustWork = TRUE))" -e "message()" | grep "StanHeaders")

STANC_FLAGS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "cat(ifelse(utils::packageVersion('rstan') >= 2.26, '-DUSE_STANC3',''))")
PKG_CPPFLAGS = -I"../inst/include" -I"$(STANHEADERS_SRC)" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_MATH_OVERFLOW_ERROR_POLICY=errno_on_error $(STANC_FLAGS)
PKG_CPPFLAGS = -I"../inst/include" -I"$(STANHEADERS_SRC)" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_MATH_OVERFLOW_ERROR_POLICY=errno_on_error $(STANC_FLAGS) -D_HAS_AUTO_PTR_ETC=0
PKG_CXXFLAGS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::CxxFlags()") $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::CxxFlags()")
PKG_LIBS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::RcppParallelLibs()") $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::LdFlags()")

CXX_STD = CXX14
CXX_STD = CXX17
Binary file modified src/RcppExports.o
Binary file not shown.
2,935 changes: 1,732 additions & 1,203 deletions src/stanExports_dirichregmod.h

Large diffs are not rendered by default.

Binary file modified src/stanExports_dirichregmod.o
Binary file not shown.
Binary file modified src/zoid.so
Binary file not shown.

0 comments on commit c9a53a4

Please sign in to comment.