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

New version - fxTWAPLS v0.1.2 #21

Merged
merged 44 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
edbf0c4
Add y <- y/rowSums(y) to WAPLS and TWAPLS predict functions
ml4418 Nov 21, 2022
eb55747
Remove taxa with 0 tolerance in TWAPLS.w() and TWAPLS.w2()
ml4418 Nov 21, 2022
d3d3172
Remove taxa with 0 tolerance correspondingly in TWAPLS.predict.w()
ml4418 Nov 21, 2022
997fdcf
Add Iberia paper reference
ml4418 Nov 21, 2022
00c1582
Modify the example script of each function
ml4418 Nov 21, 2022
99ea9bf
Modify the notes
ml4418 Nov 21, 2022
a46e5c2
Change the name of longitude and latitude
ml4418 Nov 21, 2022
65e5918
Modify the example script of random t test
ml4418 Nov 21, 2022
4fc3452
Add instructions on how to choose nsig
ml4418 Nov 21, 2022
3ec8324
Add example script on the main page
ml4418 Nov 21, 2022
2c2a9d4
Change back the name of longitude and latitude
ml4418 Nov 21, 2022
19516ec
Update news.md
ml4418 Nov 21, 2022
cbf5f98
Merge branch 'master' into dev
villegar Nov 21, 2022
4334232
Update R-CMD-check.yaml
villegar Nov 21, 2022
601206d
Update pkgdown.yaml
villegar Nov 21, 2022
6e722b5
Update test-coverage.yml
villegar Nov 22, 2022
12083c7
Update test-coverage.yml
villegar Nov 22, 2022
3e79a46
Update GHA
villegar Nov 22, 2022
841fc96
Add pull request template
villegar Nov 22, 2022
057021c
Add new suggested packages
villegar Nov 22, 2022
6883896
Add lintr config file
villegar Nov 22, 2022
034fd65
Update lintr configuration
villegar Nov 22, 2022
ac08306
Remove the redundant code in fx_pspline()
ml4418 Nov 24, 2022
d06e346
Replace Ytottot with sum(y)
ml4418 Nov 24, 2022
2d97f5f
Remove redundant sumk_yik, sumi_yik and meanx in TWAPLS.predict.w()
ml4418 Nov 24, 2022
ef65f2c
Remove redundant meanx in WAPLS.predict.w()
ml4418 Nov 24, 2022
4dc191d
Add the forgotted part, which is removing taxa with 0 tolerance in hi…
ml4418 Nov 24, 2022
44788f9
Remove redundant variable in sse.sample()
ml4418 Nov 24, 2022
ed029b3
Ignore object names and commented code
villegar Nov 24, 2022
175d95e
Update version of Roxygen
villegar Nov 24, 2022
160ba53
Merge branch 'dev' of https://github.com/special-uor/fxTWAPLS into dev
villegar Nov 24, 2022
ab65cdd
Apply lintr styles to the code (e.g. remove trailing whitespaces, add…
villegar Nov 24, 2022
350bb1d
Minor changes
villegar Nov 24, 2022
a8d2996
New build
villegar Nov 24, 2022
1ae78eb
Update version number
villegar Nov 24, 2022
97eb87f
Add new publication and example
villegar Nov 24, 2022
2b2e02b
Minor styling
villegar Nov 24, 2022
c2dda73
Update list of ignored files
villegar Nov 24, 2022
92ab311
Apply styler and remove commented code
villegar Nov 24, 2022
ab06baf
Minor styling changes
villegar Nov 24, 2022
c6a77ab
Minor changes in the examples
villegar Nov 24, 2022
b404b5d
New build
villegar Nov 24, 2022
eb16930
Remove trailing white spaces
villegar Nov 25, 2022
177cba1
New build
villegar Nov 25, 2022
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
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@
^inst/images$
^\.zenodo\.json$
^documentation$
^.lintr$
^.DS_Store$
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- [ ] ran `devtools::document()`
- [ ] ran `spelling::spell_check_package()` and corrected any spelling errors
- [ ] ran `lintr::lint_package()` and resolved all lint warnings and notes
- [ ] ran `styler::style_pkg()` to make sure code matches the style guidelines
- [ ] ran R-CMD CHECK and resolved all issues
80 changes: 14 additions & 66 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,81 +1,29 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- master
branches: [main, master]
pull_request:
branches:
- master
branches: [main, master]

name: R-CMD-check

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

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

runs-on: ubuntu-latest
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}

GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

- uses: r-lib/actions/setup-pandoc@master
use-public-rspm: true

- 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: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@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-

- 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 dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}
extra-packages: any::rcmdcheck
needs: check

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- 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
30 changes: 30 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
pull_request:
branches: [main, master]

name: lint

jobs:
lint:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::lintr, local::.
needs: lint

- name: Lint
run: lintr::lint_package()
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
58 changes: 29 additions & 29 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: master
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: macOS-latest
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-pandoc@master

- 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}
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Cache R packages
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@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-
extra-packages: any::pkgdown, local::.
needs: website

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
install.packages("pkgdown")
- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
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)'
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
57 changes: 0 additions & 57 deletions .github/workflows/test-coverage.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ docs
inst/doc
CRAN-RELEASE
cran-comments.md
.DS_Store
10 changes: 10 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
linters: linters_with_defaults(
line_length_linter(150),
cyclocomp_linter(25),
object_name_linter = NULL,
commented_code_linter = NULL)
exclusions: list()
exclude: "# Exclude Linting"
exclude_start: "# Begin Exclude Linting"
exclude_end: "# End Exclude Linting"
encoding: "ISO-8859-1"
7 changes: 5 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: fxTWAPLS
Title: An Improved Version of WA-PLS
Version: 0.1.1
Version: 0.1.2
Authors@R: c(
person(given = "Mengmeng",
family = "Liu",
Expand Down Expand Up @@ -52,12 +52,15 @@ Imports:
parallel,
progressr
Suggests:
lintr (>= 3.0.0),
magrittr,
progress,
scales,
spelling,
styler,
tictoc
Depends:
R (>= 3.6)
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.2
Language: en-GB
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# fxTWAPLS (development version)

# fxTWAPLS 0.1.2
* Remove taxa with 0 tolerance.
* Add example script to the main page.
* Add reference to the functions `WAPLS.w2` and `TWAPLS.w2`.

# fxTWAPLS 0.1.1
* Update maintainer's contact information.

Expand Down
Loading