Skip to content

Commit

Permalink
dependency fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
till-tietz committed Dec 2, 2024
1 parent 57d19c1 commit b8d6887
Show file tree
Hide file tree
Showing 9 changed files with 153 additions and 110 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: CausalQueries
Type: Package
Title: Make, Update, and Query Binary Causal Models
Version: 1.2.1
Version: 1.3.0
Authors@R: c(person("Clara", "Bicalho", email = "clarabmcorreia@gmail.com", role = c("ctb")),
person("Jasper", "Cooper", email = "jjc2247@columbia.edu", role = c("ctb")),
person("Macartan", "Humphreys", email = "macartan@gmail.com", role = c("aut"),
Expand Down Expand Up @@ -50,6 +50,8 @@ Suggests:
rmarkdown,
DeclareDesign,
fabricatr,
texreg,
estimatr,
bayesplot,
covr
SystemRequirements: GNU make
Expand Down
4 changes: 2 additions & 2 deletions R/CausalQueries-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' update over models given data, and calculate arbitrary causal queries.
#' Model definition makes use of dagitty type syntax.
#' Updating is implemented in 'stan'.
#' @docType _PACKAGE
#' @docType package
#'
#' @name CausalQueries
#' @importFrom utils globalVariables
Expand All @@ -15,5 +15,5 @@ globalVariables(names = c("posterior", "prob", "restrict", "n", "model", "data",
"%>%", "node", "nodal_type","param_set", "event",
"count", "strategy", "distinct", "e", "v", "w",
"gen","children","given","param_value","priors",
"g"
"g", "label", "query"
))
2 changes: 1 addition & 1 deletion R/stanmodels.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ stanmodels <- sapply(stanmodels, function(model_name) {
model_name = stanfit$model_name,
model_code = stanfit$model_code,
model_cpp = stanfit$model_cpp,
mk_cppmodule = function(x) get(paste0("rstantools_model_", model_name)))
mk_cppmodule = function(x) get(paste0("model_", model_name)))
})
31 changes: 30 additions & 1 deletion man/CausalQueries.Rd

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

5 changes: 2 additions & 3 deletions src/Makevars.win
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,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 -DRCPP_PARALLEL_USE_TBB=1 $(STANC_FLAGS) -D_HAS_AUTO_PTR_ETC=0
PKG_CPPFLAGS = -I"../inst/include" -I"$(STANHEADERS_SRC)" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DRCPP_PARALLEL_USE_TBB=1
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 = CXX17
CXX_STD = CXX14
2 changes: 1 addition & 1 deletion src/stanExports_simplexes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using namespace Rcpp ;
RCPP_MODULE(stan_fit4simplexes_mod) {


class_<rstan::stan_fit<stan_model, boost::random::ecuyer1988> >("rstantools_model_simplexes")
class_<rstan::stan_fit<stan_model, boost::random::ecuyer1988> >("model_simplexes")

.constructor<SEXP,SEXP,SEXP>()

Expand Down
198 changes: 99 additions & 99 deletions src/stanExports_simplexes.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#ifndef MODELS_HPP
#define MODELS_HPP
#define STAN__SERVICES__COMMAND_HPP
#include <rstan/rstaninc.hpp>
#ifndef USE_STANC3
#define USE_STANC3
#endif
#include <rstan/rstaninc.hpp>
// Code generated by stanc v2.32.2
#include <stan/model/model_header.hpp>
namespace model_simplexes_namespace {
Expand All @@ -29,104 +29,104 @@ using namespace stan::math;
stan::math::profile_map profiles__;
static constexpr std::array<const char*, 99> locations_array__ =
{" (found before start of program)",
" (in 'string', line 33, column 0 to column 47)",
" (in 'string', line 36, column 0 to column 43)",
" (in 'string', line 37, column 0 to column 41)",
" (in 'string', line 38, column 0 to column 33)",
" (in 'string', line 39, column 0 to column 33)",
" (in 'string', line 40, column 0 to column 38)",
" (in 'string', line 41, column 0 to column 35)",
" (in 'string', line 42, column 0 to column 42)",
" (in 'string', line 92, column 0 to column 22)",
" (in 'string', line 51, column 4 to line 52, column 58)",
" (in 'string', line 53, column 4 to line 55, column 20)",
" (in 'string', line 50, column 36 to line 56, column 5)",
" (in 'string', line 50, column 7 to line 56, column 5)",
" (in 'string', line 47, column 4 to column 22)",
" (in 'string', line 48, column 4 to column 29)",
" (in 'string', line 46, column 32 to line 49, column 5)",
" (in 'string', line 46, column 2 to line 56, column 5)",
" (in 'string', line 45, column 26 to line 57, column 3)",
" (in 'string', line 45, column 0 to line 57, column 3)",
" (in 'string', line 60, column 0 to column 49)",
" (in 'string', line 63, column 1 to column 66)",
" (in 'string', line 62, column 21 to line 64, column 2)",
" (in 'string', line 62, column 0 to line 64, column 2)",
" (in 'string', line 67, column 2 to column 29)",
" (in 'string', line 66, column 21 to line 68, column 2)",
" (in 'string', line 66, column 0 to line 68, column 2)",
" (in 'string', line 70, column 1 to column 14)",
" (in 'string', line 72, column 1 to column 16)",
" (in 'string', line 95, column 3 to column 48)",
" (in 'string', line 94, column 21 to line 96, column 1)",
" (in 'string', line 94, column 0 to line 96, column 1)",
" (in 'string', line 93, column 32 to line 96, column 2)",
" (in 'string', line 93, column 0 to line 96, column 2)",
" (in 'string', line 98, column 4 to column 35)",
" (in 'string', line 97, column 33 to line 99, column 2)",
" (in 'string', line 97, column 1 to line 99, column 2)",
" (in 'string', line 77, column 2 to line 78, column 43)",
" (in 'string', line 79, column 2 to column 50)",
" (in 'string', line 76, column 26 to line 80, column 2)",
" (in 'string', line 76, column 0 to line 80, column 2)",
" (in 'string', line 84, column 2 to line 87, column 55)",
" (in 'string', line 83, column 26 to line 88, column 2)",
" (in 'string', line 83, column 0 to line 88, column 2)",
" (in 'string', line 9, column 0 to column 22)",
" (in 'string', line 10, column 0 to column 21)",
" (in 'string', line 11, column 0 to column 21)",
" (in 'string', line 12, column 0 to column 26)",
" (in 'string', line 13, column 0 to column 21)",
" (in 'string', line 14, column 6 to column 18)",
" (in 'string', line 14, column 0 to column 46)",
" (in 'string', line 15, column 0 to column 20)",
" (in 'string', line 16, column 0 to column 22)",
" (in 'string', line 17, column 0 to column 26)",
" (in 'string', line 18, column 0 to column 45)",
" (in 'string', line 19, column 16 to column 24)",
" (in 'string', line 19, column 0 to column 40)",
" (in 'string', line 20, column 6 to column 18)",
" (in 'string', line 20, column 0 to column 42)",
" (in 'string', line 21, column 6 to column 18)",
" (in 'string', line 21, column 0 to column 40)",
" (in 'string', line 22, column 6 to column 13)",
" (in 'string', line 22, column 0 to column 40)",
" (in 'string', line 23, column 6 to column 13)",
" (in 'string', line 23, column 0 to column 38)",
" (in 'string', line 24, column 6 to column 18)",
" (in 'string', line 24, column 0 to column 49)",
" (in 'string', line 25, column 6 to column 18)",
" (in 'string', line 25, column 0 to column 47)",
" (in 'string', line 26, column 7 to column 15)",
" (in 'string', line 26, column 17 to column 24)",
" (in 'string', line 26, column 0 to column 28)",
" (in 'string', line 27, column 7 to column 15)",
" (in 'string', line 27, column 17 to column 24)",
" (in 'string', line 27, column 0 to column 33)",
" (in 'string', line 28, column 7 to column 14)",
" (in 'string', line 28, column 16 to column 22)",
" (in 'string', line 28, column 0 to column 28)",
" (in 'string', line 29, column 24 to column 32)",
" (in 'string', line 29, column 33 to column 39)",
" (in 'string', line 29, column 0 to column 43)",
" (in 'string', line 30, column 6 to column 14)",
" (in 'string', line 30, column 0 to column 31)",
" (in 'string', line 33, column 16 to column 39)",
" (in 'string', line 36, column 25 to column 33)",
" (in 'string', line 37, column 16 to column 28)",
" (in 'string', line 38, column 7 to column 15)",
" (in 'string', line 38, column 17 to column 24)",
" (in 'string', line 39, column 7 to column 14)",
" (in 'string', line 39, column 16 to column 23)",
" (in 'string', line 40, column 25 to column 32)",
" (in 'string', line 41, column 25 to column 31)",
" (in 'string', line 42, column 25 to column 33)",
" (in 'string', line 92, column 7 to column 14)",
" (in 'string', line 3, column 15 to column 22)",
" (in 'string', line 3, column 4 to column 27)",
" (in 'string', line 4, column 4 to column 40)",
" (in 'string', line 5, column 4 to column 14)",
" (in 'string', line 2, column 32 to line 6, column 3)"};
" (in 'simplexes', line 33, column 0 to column 47)",
" (in 'simplexes', line 36, column 0 to column 43)",
" (in 'simplexes', line 37, column 0 to column 41)",
" (in 'simplexes', line 38, column 0 to column 33)",
" (in 'simplexes', line 39, column 0 to column 33)",
" (in 'simplexes', line 40, column 0 to column 38)",
" (in 'simplexes', line 41, column 0 to column 35)",
" (in 'simplexes', line 42, column 0 to column 42)",
" (in 'simplexes', line 92, column 0 to column 22)",
" (in 'simplexes', line 51, column 4 to line 52, column 58)",
" (in 'simplexes', line 53, column 4 to line 55, column 20)",
" (in 'simplexes', line 50, column 36 to line 56, column 5)",
" (in 'simplexes', line 50, column 7 to line 56, column 5)",
" (in 'simplexes', line 47, column 4 to column 22)",
" (in 'simplexes', line 48, column 4 to column 29)",
" (in 'simplexes', line 46, column 32 to line 49, column 5)",
" (in 'simplexes', line 46, column 2 to line 56, column 5)",
" (in 'simplexes', line 45, column 26 to line 57, column 3)",
" (in 'simplexes', line 45, column 0 to line 57, column 3)",
" (in 'simplexes', line 60, column 0 to column 49)",
" (in 'simplexes', line 63, column 1 to column 66)",
" (in 'simplexes', line 62, column 21 to line 64, column 2)",
" (in 'simplexes', line 62, column 0 to line 64, column 2)",
" (in 'simplexes', line 67, column 2 to column 29)",
" (in 'simplexes', line 66, column 21 to line 68, column 2)",
" (in 'simplexes', line 66, column 0 to line 68, column 2)",
" (in 'simplexes', line 70, column 1 to column 14)",
" (in 'simplexes', line 72, column 1 to column 16)",
" (in 'simplexes', line 95, column 3 to column 48)",
" (in 'simplexes', line 94, column 21 to line 96, column 1)",
" (in 'simplexes', line 94, column 0 to line 96, column 1)",
" (in 'simplexes', line 93, column 32 to line 96, column 2)",
" (in 'simplexes', line 93, column 0 to line 96, column 2)",
" (in 'simplexes', line 98, column 4 to column 35)",
" (in 'simplexes', line 97, column 33 to line 99, column 2)",
" (in 'simplexes', line 97, column 1 to line 99, column 2)",
" (in 'simplexes', line 77, column 2 to line 78, column 43)",
" (in 'simplexes', line 79, column 2 to column 50)",
" (in 'simplexes', line 76, column 26 to line 80, column 2)",
" (in 'simplexes', line 76, column 0 to line 80, column 2)",
" (in 'simplexes', line 84, column 2 to line 87, column 55)",
" (in 'simplexes', line 83, column 26 to line 88, column 2)",
" (in 'simplexes', line 83, column 0 to line 88, column 2)",
" (in 'simplexes', line 9, column 0 to column 22)",
" (in 'simplexes', line 10, column 0 to column 21)",
" (in 'simplexes', line 11, column 0 to column 21)",
" (in 'simplexes', line 12, column 0 to column 26)",
" (in 'simplexes', line 13, column 0 to column 21)",
" (in 'simplexes', line 14, column 6 to column 18)",
" (in 'simplexes', line 14, column 0 to column 46)",
" (in 'simplexes', line 15, column 0 to column 20)",
" (in 'simplexes', line 16, column 0 to column 22)",
" (in 'simplexes', line 17, column 0 to column 26)",
" (in 'simplexes', line 18, column 0 to column 45)",
" (in 'simplexes', line 19, column 16 to column 24)",
" (in 'simplexes', line 19, column 0 to column 40)",
" (in 'simplexes', line 20, column 6 to column 18)",
" (in 'simplexes', line 20, column 0 to column 42)",
" (in 'simplexes', line 21, column 6 to column 18)",
" (in 'simplexes', line 21, column 0 to column 40)",
" (in 'simplexes', line 22, column 6 to column 13)",
" (in 'simplexes', line 22, column 0 to column 40)",
" (in 'simplexes', line 23, column 6 to column 13)",
" (in 'simplexes', line 23, column 0 to column 38)",
" (in 'simplexes', line 24, column 6 to column 18)",
" (in 'simplexes', line 24, column 0 to column 49)",
" (in 'simplexes', line 25, column 6 to column 18)",
" (in 'simplexes', line 25, column 0 to column 47)",
" (in 'simplexes', line 26, column 7 to column 15)",
" (in 'simplexes', line 26, column 17 to column 24)",
" (in 'simplexes', line 26, column 0 to column 28)",
" (in 'simplexes', line 27, column 7 to column 15)",
" (in 'simplexes', line 27, column 17 to column 24)",
" (in 'simplexes', line 27, column 0 to column 33)",
" (in 'simplexes', line 28, column 7 to column 14)",
" (in 'simplexes', line 28, column 16 to column 22)",
" (in 'simplexes', line 28, column 0 to column 28)",
" (in 'simplexes', line 29, column 24 to column 32)",
" (in 'simplexes', line 29, column 33 to column 39)",
" (in 'simplexes', line 29, column 0 to column 43)",
" (in 'simplexes', line 30, column 6 to column 14)",
" (in 'simplexes', line 30, column 0 to column 31)",
" (in 'simplexes', line 33, column 16 to column 39)",
" (in 'simplexes', line 36, column 25 to column 33)",
" (in 'simplexes', line 37, column 16 to column 28)",
" (in 'simplexes', line 38, column 7 to column 15)",
" (in 'simplexes', line 38, column 17 to column 24)",
" (in 'simplexes', line 39, column 7 to column 14)",
" (in 'simplexes', line 39, column 16 to column 23)",
" (in 'simplexes', line 40, column 25 to column 32)",
" (in 'simplexes', line 41, column 25 to column 31)",
" (in 'simplexes', line 42, column 25 to column 33)",
" (in 'simplexes', line 92, column 7 to column 14)",
" (in 'simplexes', line 3, column 15 to column 22)",
" (in 'simplexes', line 3, column 4 to column 27)",
" (in 'simplexes', line 4, column 4 to column 40)",
" (in 'simplexes', line 5, column 4 to column 14)",
" (in 'simplexes', line 2, column 32 to line 6, column 3)"};
template <typename T0__,
stan::require_all_t<stan::is_eigen_matrix_dynamic<T0__>,
stan::is_vt_not_complex<T0__>>* = nullptr>
Expand Down
16 changes: 15 additions & 1 deletion vignettes/c-canonical-models.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,22 @@ knitr::opts_chunk$set(
```

```{r setup, warning = FALSE, message = FALSE}
if(!requireNamespace("estimatr", quietly = TRUE)) {
install.packages("estimatr")
}
if(!requireNamespace("texreg", quietly = TRUE)) {
install.packages("texreg")
}
library(CausalQueries)
options(mc.cores = parallel::detectCores())
library(dplyr)
library(knitr)
library(estimatr)
library(texreg)
options(mc.cores = 2)
set.seed(1)
```

Expand Down
1 change: 0 additions & 1 deletion vignettes/d-front-door.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ knitr::opts_chunk$set(
```

```{r setup, warning = FALSE, message = FALSE}
library(CausalQueries)
library(dplyr)
library(knitr)
Expand Down

0 comments on commit b8d6887

Please sign in to comment.