Skip to content

run_PLSR_example-auto #169

run_PLSR_example-auto

run_PLSR_example-auto #169

on:
schedule:
- cron: '0 0 */2 * *'
name: run_PLSR_example-auto
env:
R_LIBS_USER: /usr/local/lib/R/site-library
LC_ALL: en_US.UTF-8
NCPUS: 2
jobs:
run-plsr:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
strategy:
fail-fast: false
matrix:
R:
- "3.6"
- "4.0"
- "4.1"
- "4.2"
- "4.3"
- "4.4"
steps:
#check out source code
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
- name: Query dependencies
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: Install dependencies
run: |
Rscript -e 'remotes::install_github(repo="TESTgroup-BNL/spectratrait", dependencies=TRUE)'
# Run R script
- name: Run Ely et al. (2019) PLSR Example
run: |
source("inst/scripts/spectra-trait_ely_leafN_plsr_bootstrap_example.R")
shell: Rscript {0}