-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding
prior_mixture()
and spike-and-slab style model-averaging upg…
…rades (#30) ### Features - adding `prior_mixture()` function for creating a mixture of prior distributions - adding `as_mixed_posteriors()` and `as_marginal_inference()` functions for a single JAGS models (with spike and slab or mixture priors) to enabling tables and figures based on the corresponding output - adding `interpret2()` function for another way of creating textual summaries without the need of inference and samples objects - speedup and improvements to the `runjags_estimates_table()` function ### Fixes - small fixes for expansion of the RoBMA functionality
- Loading branch information
Showing
213 changed files
with
18,159 additions
and
2,146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
^renv$ | ||
^renv\.lock$ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
^do-not-share$ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
if(interactive()){ | ||
library(devtools) | ||
library(testthat) | ||
library(vdiffr) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,64 @@ | ||
name: pkgdown | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
tags: | ||
-'*' | ||
|
||
name: pkgdown | ||
- '*' | ||
|
||
jobs: | ||
pkgdown: | ||
build: | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
- {os: windows-latest, r: 'release'} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- name: Install harfbuzz freetype2 fribidi Headers | ||
if: runner.os == 'Linux' | ||
run: sudo apt-get install libharfbuzz-dev libfribidi-dev | ||
|
||
|
||
- name: Query dependencies | ||
# Install JAGS on Windows | ||
- name: Install JAGS (Windows) | ||
if: runner.os == 'Windows' | ||
shell: cmd | ||
run: | | ||
install.packages('remotes') | ||
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | ||
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") | ||
shell: Rscript {0} | ||
|
||
- name: Restore R package cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.R_LIBS_USER }} | ||
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} | ||
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- | ||
curl -o jags-installer.exe -L https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Windows/JAGS-4.3.1.exe/download | ||
jags-installer.exe /S | ||
del jags-installer.exe | ||
- name: Install system dependencies | ||
if: runner.os == 'Linux' | ||
run: | | ||
while read -r cmd | ||
do | ||
eval sudo $cmd | ||
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') | ||
- name: Install JAGS (windows-latest) | ||
# Set JAGS environment variables on Windows | ||
- name: Set JAGS environment variables (Windows) | ||
if: runner.os == 'Windows' | ||
run: | | ||
curl.exe -o wjags.exe --url https://deac-fra.dl.sourceforge.net/project/mcmc-jags/JAGS/4.x/Windows/JAGS-4.3.1.exe | ||
wjags.exe /S | ||
del wjags.exe | ||
shell: cmd | ||
run: | | ||
echo JAGS_ROOT=C:\Program Files\JAGS\JAGS-4.3.1>> %GITHUB_ENV% | ||
echo JAGS_MAJOR_VERSION=4>> %GITHUB_ENV% | ||
echo PATH=C:\Program Files\JAGS\JAGS-4.3.1\bin;%PATH%>> %GITHUB_ENV% | ||
- name: Install JAGS (macOS-latest) | ||
if: runner.os == 'macOS' | ||
run : | | ||
rm '/usr/local/bin/gfortran' | ||
brew install automake jags | ||
- name: Install dependencies | ||
# Install Pandoc | ||
- name: Setup Pandoc | ||
uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
# Install the package and its dependencies | ||
- name: Install required packages | ||
run: | | ||
remotes::install_deps(dependencies = TRUE) | ||
install.packages("pkgdown") | ||
options(repos = c(CRAN = "https://cloud.r-project.org")) | ||
install.packages('devtools') | ||
install.packages('pkgdown') | ||
install.packages(c('BayesFactor', 'RoBMA', 'runjags', 'rjags', 'rstan', 'scales', 'vdiffr', 'testthat', 'covr', 'pandoc')) | ||
devtools::install() | ||
shell: Rscript {0} | ||
|
||
- name: Install package | ||
run: R CMD INSTALL . | ||
|
||
- name: Deploy package | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Actions" | ||
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' | ||
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' |
Oops, something went wrong.