Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 12 additions & 41 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,63 +12,34 @@ name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
runs-on: ${{ matrix.os }}

name: ${{ matrix.config.rstan }} RStan - ${{ matrix.config.os }} (${{ matrix.config.r }})
name: R CMD CHECK - ${{ matrix.os }} (${{ matrix.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'devel', rstan: 'CRAN'}
- {os: macOS-latest, r: 'release', rstan: 'CRAN'}
- {os: windows-latest, r: 'devel', rstan: 'CRAN'}
- {os: windows-latest, r: 'release', rstan: 'CRAN'}
- {os: ubuntu-latest, r: 'devel', rstan: 'CRAN'}
- {os: ubuntu-latest, r: 'release', rstan: 'CRAN'}
- {os: ubuntu-latest, r: 'oldrel', rstan: 'CRAN'}

- {os: macOS-latest, r: 'release', rstan: 'Preview'}
- {os: windows-latest, r: 'release', rstan: 'Preview'}
os: [macOS-latest, windows-latest, ubuntu-latest, ubuntu-24.04-arm]
r: ['devel', 'release', 'oldrel']
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
TESTTHAT_CPUS: 4

steps:
- uses: n1hility/cancel-previous-runs@v2
- uses: n1hility/cancel-previous-runs@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: R-CMD-check.yaml
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"

- uses: actions/checkout@v3
- uses: actions/checkout@main

- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r@v2-branch
with:
r-version: ${{ matrix.config.r }}
r-version: ${{ matrix.r }}

- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
- uses: r-lib/actions/setup-pandoc@v2-branch
- uses: r-lib/actions/setup-r-dependencies@v2-branch
with:
cache-version: 2
extra-packages: any::rcmdcheck any::betareg any::HSAUR3 any::biglm any::gamm4 any::V8

- name: Install RStan Preview if Needed
run: |
if ("${{ matrix.config.rstan }}" == "Preview") {
install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
}
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--as-cran", "--ignore-vignettes")'
build_args: '"--no-build-vignettes"'

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
- uses: r-lib/actions/check-r-package@v2-branch
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ src/stan_files/*.hpp
src/rstanarm.so
src/rstanarm.dll
src/init.o
man/*.Rd
!man/rstanarm-internal.Rd
vignettes/*.R
!vignettes/*.Rmd
vignettes/*.html
vignettes/*_files
.DS_Store
revdep/*
*.o
*.cc
*.h
src/Makevars
R/stanmodels.R
4 changes: 4 additions & 0 deletions R/misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,10 @@ get_x.default <- function(object, ...) {
object[["x"]] %ORifNULL% model.matrix(object)
}
#' @export
get_x.betareg <- function(object, ...) {
model.matrix(object$terms[["mean"]], model.frame(object), contrasts = object$contrasts[["contrasts"]])
}
#' @export
get_x.gamm4 <- function(object, ...) {
as.matrix(object[["x"]])
}
Expand Down
37 changes: 0 additions & 37 deletions R/stanmodels.R

This file was deleted.

11 changes: 3 additions & 8 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
# Part of the rstanarm package for estimating model parameters
# Copyright (C) 2015, 2016, 2017 Trustees of Columbia University
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

.onLoad <- function(libname, pkgname) {
modules <- paste0("stan_fit4", names(stanmodels), "_mod")
for (m in modules) loadModule(m, what = TRUE)
}

.onAttach <- function(...) {
ver <- utils::packageVersion("rstanarm")
packageStartupMessage("This is rstanarm version ", ver)
Expand Down
5 changes: 0 additions & 5 deletions cleanup

This file was deleted.

7 changes: 0 additions & 7 deletions cleanup.win

This file was deleted.

2 changes: 2 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /bin/sh
"${R_HOME}/bin/Rscript" -e "rstantools::rstan_config()"
62 changes: 0 additions & 62 deletions configure.ac

This file was deleted.

2 changes: 2 additions & 0 deletions configure.win
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /bin/sh
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "rstantools::rstan_config()"
File renamed without changes.
Loading
Loading