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
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
^\.Rproj\.user$
^\.github$
^_pkgdown.yml$
^_dev$
37 changes: 30 additions & 7 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,38 @@ name: R-CMD-check

jobs:
R-CMD-check:
runs-on: macOS-latest
runs-on: ubuntu-latest

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
with:
r-version: 'release'
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- name: Check
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
env:
_R_CHECK_FORCE_SUGGESTS_: true
run: |
options(crayon.enabled = TRUE)
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@v4
with:
name: r-cmdcheck-results
path: check
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ vignettes/*.pdf
# Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html
rsconnect/
.Rproj.user

# Dev folder
/_dev/
19 changes: 14 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Package: rwa
Type: Package
Title: Perform a Relative Weights Analysis
Version: 0.0.3
Author: Martin Chan <martinchan53@gmail.com>
Maintainer: Martin Chan <martinchan53@gmail.com>
Version: 0.1.0
Authors@R: person(given = "Martin",
family = "Chan",
role = c("aut", "cre"),
email = "martinchan53@gmail.com")
Description: Perform a Relative Weights Analysis (RWA) (a.k.a. Key Drivers Analysis) as per the method described
in Tonidandel & LeBreton (2015) <DOI:10.1007/s10869-014-9351-z>, with its original roots in Johnson (2000) <DOI:10.1207/S15327906MBR3501_1>. In essence, RWA decomposes
the total variance predicted in a regression model into weights that accurately reflect the proportional
Expand All @@ -14,11 +16,18 @@ Encoding: UTF-8
LazyData: true
URL: https://github.com/martinctc/rwa
BugReports: https://github.com/martinctc/rwa/issues
RoxygenNote: 7.1.1
RoxygenNote: 7.3.2
Roxygen: list(markdown = TRUE)
Imports:
dplyr,
magrittr,
stats,
tidyr,
ggplot2
ggplot2,
boot,
purrr,
utils
Suggests:
knitr,
rmarkdown
VignetteBuilder: knitr
13 changes: 13 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ export(remove_all_na_cols)
export(rwa)
import(dplyr)
import(ggplot2)
importFrom(boot,boot)
importFrom(boot,boot.ci)
importFrom(dplyr,all_of)
importFrom(dplyr,last_col)
importFrom(dplyr,mutate)
importFrom(dplyr,n)
importFrom(dplyr,relocate)
importFrom(dplyr,select)
importFrom(dplyr,tibble)
importFrom(magrittr,"%>%")
importFrom(purrr,map_dfr)
importFrom(stats,cor)
importFrom(stats,rnorm)
importFrom(tidyr,drop_na)
importFrom(utils,head)
importFrom(utils,tail)
Loading