Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPDATE #28

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7d72ac6
UPDATE
davidycliao Aug 18, 2024
7d2be75
UPDATE
davidycliao Aug 18, 2024
a1af5bf
UPDATE
davidycliao Aug 18, 2024
14fdb5a
Update mac_r.yml
davidycliao Aug 18, 2024
0360659
Update r.yml
davidycliao Aug 18, 2024
a0c2d64
UPDATE
davidycliao Aug 18, 2024
43ff96e
Update mac_r.yml
davidycliao Aug 18, 2024
651f0b4
UPDATE
davidycliao Aug 18, 2024
6f2e985
Update r.yml
davidycliao Aug 18, 2024
bb83f93
Update mac_r.yml
davidycliao Aug 18, 2024
f6ad4a1
Update r.yml
davidycliao Aug 18, 2024
7a606e3
Update r.yml
davidycliao Aug 18, 2024
be4e4fa
Update mac_r.yml
davidycliao Aug 19, 2024
6d384de
Update r.yml
davidycliao Aug 19, 2024
f128e52
Update r.yml
davidycliao Aug 19, 2024
a4a5e3a
Update mac_r.yml
davidycliao Aug 19, 2024
89f4f0f
Update mac_r.yml
davidycliao Aug 19, 2024
edb38ab
Update mac_r.yml
davidycliao Aug 19, 2024
7414d6f
Update mac_r.yml
davidycliao Aug 19, 2024
20941e8
Update mac_r.yml
davidycliao Aug 19, 2024
d70ae3f
Update mac_r.yml
davidycliao Aug 19, 2024
6279727
UPDATE
davidycliao Aug 19, 2024
7c0f6cc
Update mac_r.yml
davidycliao Aug 19, 2024
6ff9fef
Update mac_r.yml
davidycliao Aug 19, 2024
907014d
Update mac_r.yml
davidycliao Aug 19, 2024
01c8f1e
Update mac_r.yml
davidycliao Aug 19, 2024
27586c7
Update mac_r.yml
davidycliao Aug 19, 2024
fa7b888
Update mac_r.yml
davidycliao Aug 19, 2024
c77a7f9
Update mac_r.yml
davidycliao Aug 19, 2024
fd922a7
Update mac_r.yml
davidycliao Aug 19, 2024
5a51d63
Update mac_r.yml
davidycliao Aug 19, 2024
69c403c
Update mac_r.yml
davidycliao Aug 19, 2024
570d88c
Update mac_r.yml
davidycliao Aug 19, 2024
e138c51
Update mac_r.yml
davidycliao Aug 19, 2024
3cca394
Update mac_r.yml
davidycliao Aug 19, 2024
f3980fa
Update mac_r.yml
davidycliao Aug 19, 2024
34b0014
Create ch3.Rmd
davidycliao Aug 22, 2024
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
73 changes: 32 additions & 41 deletions .github/workflows/mac_r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,87 +5,78 @@
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.
name: R Package CI for Windows
name: R Package CI for macOS

on:
push:
branches: [ "master" ]
branches: ["master"]
pull_request:
branches: [ "master" ]
branches: ["master"]

permissions:
contents: read
contents: read

jobs:
build:
runs-on: windows-latest
runs-on: macos-latest
strategy:
matrix:
os: [windows-latest]
os: [macos-latest]
r-version: ['4.1.1']

steps:
- uses: actions/checkout@v4

- name: Install system dependencies on Windows
- name: Install system dependencies on macOS
run: |
choco install jags
choco install miktex
choco install rtools
choco install gfortran
shell: cmd

- name: Update MiKTeX package database
run: |
mpm --update-db
mpm --update
shell: cmd
brew install jags
brew install --cask mactex-no-gui
brew install gcc
shell: bash

- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}

- name: Install remotes package
run: |
Rscript -e "install.packages('remotes')"
shell: Rscript {0}
run: Rscript -e 'install.packages("remotes")'
shell: /bin/bash -e {0}

- name: Install package dependencies
run: |
Rscript -e "install.packages(c('smacof', 'ellipse', 'plyr', 'vegan'))"
shell: Rscript {0}
run: Rscript -e 'install.packages(c("smacof", "ellipse", "plyr", "vegan"))'
shell: /bin/bash -e {0}

- name: Install basicspace from GitHub
env:
GITHUB_PAT: ${{ secrets.MY_GITHUB_PAT }}
run: |
Rscript -e "remotes::install_github('cran/basicspace', force = TRUE)"
shell: Rscript {0}
run: Rscript -e 'remotes::install_github("cran/basicspace", force = TRUE)'
shell: /bin/bash -e {0}

- name: Set CRAN mirror and install other R package dependencies
env:
GITHUB_PAT: ${{ secrets.MY_GITHUB_PAT }}
run: |
Rscript -e "options(repos = c(CRAN = 'https://cloud.r-project.org/')); install.packages(c('rjags', 'ggplot2', 'knitr'));"
shell: Rscript {0}
run: Rscript -e 'options(repos = c(CRAN = "https://cloud.r-project.org/")); install.packages(c("rjags", "ggplot2", "knitr"))'
shell: /bin/bash -e {0}

- name: Install rcmdcheck package
run: |
Rscript -e "install.packages('rcmdcheck')"
shell: Rscript {0}
run: Rscript -e 'install.packages("rcmdcheck")'
shell: /bin/bash -e {0}

- name: Check
run: |
Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'error')"
shell: Rscript {0}
- name: Run R CMD check
env:
PATH: /opt/homebrew/opt/gcc/bin:/opt/homebrew/bin:$PATH
run: Rscript -e 'rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")'
shell: /bin/bash -e {0}

- name: Test (optional)
run: |
Rscript -e "devtools::test()"
shell: Rscript {0}
run: Rscript -e 'devtools::test()'
shell: /bin/bash -e {0}

env:
TZ: UTC
_R_CHECK_SYSTEM_CLOCK_: FALSE
_R_CHECK_SYSTEM_CLOCK_: false
NOT_CRAN: true



53 changes: 32 additions & 21 deletions .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
branches: [ "master" ]

permissions:
contents: read
contents: read

jobs:
build:
Expand All @@ -27,59 +27,70 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Download and install JAGS
run: |
curl -L -o JAGS-4.3.0.exe https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Windows/JAGS-4.3.0.exe/download
if (Test-Path -Path ".\JAGS-4.3.0.exe") {
Start-Process -FilePath ".\JAGS-4.3.0.exe" -ArgumentList '/S' -NoNewWindow -Wait
} else {
Write-Error "Failed to download JAGS installer."
}
shell: powershell

- name: Add JAGS to PATH
run: |
echo "C:\Program Files\JAGS\JAGS-4.3.0\bin" >> $GITHUB_PATH
shell: cmd

- name: Verify JAGS installation
run: jags --version
shell: cmd

- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}

- name: Install system dependencies on Windows
- name: Install remotes package
run: |
choco install qpdf
choco install pkgconfiglite
choco install make
choco install miktex # Install LaTeX
choco install rtools # Install Rtools if needed
Rscript -e "install.packages('remotes')"
shell: cmd

- name: Update MiKTeX package database
- name: Install CRAN packages including rjags
run: |
mpm --update-db
mpm --update
Rscript -e "options(repos = 'https://cloud.r-project.org/')"
Rscript -e "install.packages('rjags')"
Rscript -e "install.packages(c('smacof', 'ellipse', 'plyr', 'vegan'), dependencies=TRUE)"
shell: cmd

- name: Install remotes package
run: |
Rscript -e "install.packages('remotes')"
shell: Rscript {0}

- name: Install basicspace from GitHub
env:
GITHUB_PAT: ${{ secrets.MY_GITHUB_PAT }}
run: |
Rscript -e "remotes::install_github('cran/basicspace', force = TRUE)"
shell: Rscript {0}
shell: cmd

- name: Set CRAN mirror and install other R package dependencies
env:
GITHUB_PAT: ${{ secrets.MY_GITHUB_PAT }}
run: |
Rscript -e "options(repos = c(CRAN = 'https://cloud.r-project.org/')); install.packages(c('rjags', 'ggplot2', 'knitr'));"
shell: Rscript {0}
Rscript -e "options(repos = c(CRAN = 'https://cloud.r-project.org/')); install.packages(c('ggplot2', 'knitr'));"
shell: cmd

- name: Install rcmdcheck package
run: |
Rscript -e "install.packages('rcmdcheck')"
shell: Rscript {0}
shell: cmd

- name: Check
run: |
Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'error')"
shell: Rscript {0}
shell: cmd

- name: Test (optional)
run: |
Rscript -e "devtools::test()"
shell: Rscript {0}
shell: cmd

env:
TZ: UTC
Expand Down
6 changes: 3 additions & 3 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ navbar:
menu:
- text: "Chapter 2: Analyzing Issue Scales"
href: articles/ch2.html
- text: "Chapter 3: Similarities and Dissimilarities Data (Coming soon)"
href:
- text: "Chapter 3: Similarities and Dissimilarities Data"
href: articles/ch3.html
- text: "Chapter 4: Rating Scale Data"
href: articles/ch4.html
- text: "Chapter 5: Binary Choice Data (Coming soon)"
- text: "Chapter 5: Binary Choice Data (In prgoress)"
href: articles/ch5.html
- text: "Chapter 6: Bayesian Scaling Models (Coming soon)"
href:
Expand Down
Loading
Loading