Skip to content

Commit

Permalink
Move afex and PMCMRplus to Imports (#241)
Browse files Browse the repository at this point in the history
* Move afex and PMCMRplus to Imports

IndrajeetPatil/ggstatsplot#837

* Apply automatic changes

* minor

* rstantools is needed

* rstantools in suggests

* fix lint

---------

Co-authored-by: IndrajeetPatil <[email protected]>
  • Loading branch information
IndrajeetPatil and IndrajeetPatil authored Apr 16, 2023
1 parent dee751e commit 214b9a5
Show file tree
Hide file tree
Showing 17 changed files with 131 additions and 117 deletions.
87 changes: 53 additions & 34 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,28 @@ references:
institution:
name: R Foundation for Statistical Computing
version: '>= 4.1.0'
- type: software
title: afex
abstract: 'afex: Analysis of Factorial Experiments'
notes: Imports
url: https://afex.singmann.science/
repository: https://CRAN.R-project.org/package=afex
authors:
- family-names: Singmann
given-names: Henrik
email: [email protected]
orcid: https://orcid.org/0000-0002-4842-3657
- family-names: Bolker
given-names: Ben
- family-names: Westfall
given-names: Jake
- family-names: Aust
given-names: Frederik
orcid: https://orcid.org/0000-0003-4900-788X
- family-names: Ben-Shachar
given-names: Mattan S.
year: '2023'
version: '>= 1.2-0'
- type: software
title: BayesFactor
abstract: 'BayesFactor: Computation of Bayes Factors for Common Designs'
Expand Down Expand Up @@ -340,6 +362,18 @@ references:
orcid: https://orcid.org/0000-0001-9560-6336
year: '2023'
version: '>= 0.10.2'
- type: software
title: PMCMRplus
abstract: 'PMCMRplus: Calculate Pairwise Multiple Comparisons of Mean Rank Sums
Extended'
notes: Imports
repository: https://CRAN.R-project.org/package=PMCMRplus
authors:
- family-names: Pohlert
given-names: Thorsten
email: [email protected]
orcid: https://orcid.org/0000-0003-3855-3025
year: '2023'
- type: software
title: purrr
abstract: 'purrr: Functional Programming Tools'
Expand Down Expand Up @@ -463,28 +497,6 @@ references:
given-names: Nathan
email: [email protected]
year: '2023'
- type: software
title: afex
abstract: 'afex: Analysis of Factorial Experiments'
notes: Suggests
url: https://afex.singmann.science/
repository: https://CRAN.R-project.org/package=afex
authors:
- family-names: Singmann
given-names: Henrik
email: [email protected]
orcid: https://orcid.org/0000-0002-4842-3657
- family-names: Bolker
given-names: Ben
- family-names: Westfall
given-names: Jake
- family-names: Aust
given-names: Frederik
orcid: https://orcid.org/0000-0003-4900-788X
- family-names: Ben-Shachar
given-names: Mattan S.
year: '2023'
version: '>= 1.2-0'
- type: software
title: ggplot2
abstract: 'ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics'
Expand Down Expand Up @@ -570,18 +582,6 @@ references:
email: [email protected]
- name: R Development Core Team
year: '2023'
- type: software
title: PMCMRplus
abstract: 'PMCMRplus: Calculate Pairwise Multiple Comparisons of Mean Rank Sums
Extended'
notes: Suggests
repository: https://CRAN.R-project.org/package=PMCMRplus
authors:
- family-names: Pohlert
given-names: Thorsten
email: [email protected]
orcid: https://orcid.org/0000-0003-3855-3025
year: '2023'
- type: software
title: rmarkdown
abstract: 'rmarkdown: Dynamic Documents for R'
Expand Down Expand Up @@ -625,6 +625,25 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0003-3925-190X
year: '2023'
- type: software
title: rstantools
abstract: 'rstantools: Tools for Developing R Packages Interfacing with ''Stan'''
notes: Suggests
url: https://mc-stan.org/rstantools/
repository: https://CRAN.R-project.org/package=rstantools
authors:
- family-names: Gabry
given-names: Jonah
email: [email protected]
- family-names: Goodrich
given-names: Ben
email: [email protected]
- family-names: Lysy
given-names: Martin
email: [email protected]
- family-names: Johnson
given-names: Andrew
year: '2023'
- type: software
title: survival
abstract: 'survival: Survival Analysis'
Expand Down
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ BugReports: https://github.com/IndrajeetPatil/statsExpressions/issues
Depends:
R (>= 4.1.0)
Imports:
afex (>= 1.2-0),
BayesFactor (>= 0.9.12-4.4),
correlation (>= 0.8.4),
datawizard (>= 0.7.1),
Expand All @@ -35,6 +36,7 @@ Imports:
magrittr,
parameters (>= 0.20.3),
performance (>= 0.10.2),
PMCMRplus,
purrr (>= 1.0.1),
rlang,
stats,
Expand All @@ -44,14 +46,13 @@ Imports:
WRS2 (>= 1.1-4),
zeallot
Suggests:
afex (>= 1.2-0),
ggplot2,
knitr,
metaBMA,
metafor,
metaplus,
PMCMRplus,
rmarkdown,
rstantools,
survival,
testthat (>= 3.1.7),
utils
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# statsExpressions 1.5.0.9000

## MAJOR CHANGES

- Following dependencies move from being weak to strong dependencies given their
importance in key functions: `{afex}` and `{PMCMRplus}`.

# statsExpressions 1.5.0

## BREAKING CHANGES
Expand Down
2 changes: 0 additions & 2 deletions R/one_sample_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ one_sample_test <- function(data,
effsize.type = "g",
...) {
type <- stats_type_switch(type)

# preparing the vector
x_vec <- stats::na.omit(data %>% pull({{ x }}))

# parametric ---------------------------------------
Expand Down
8 changes: 3 additions & 5 deletions R/oneway_anova.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@
#' @param ... Additional arguments (currently ignored).
#' @inheritParams stats::oneway.test
#'
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true") && requireNamespace("afex", quietly = TRUE)
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true")
#' # for reproducibility
#' set.seed(123)
#' library(statsExpressions)
#' suppressPackageStartupMessages(library(afex)) # for within-subjects parametric ANOVA
#'
#' # ----------------------- parametric -------------------------------------
#'
Expand Down Expand Up @@ -105,6 +104,8 @@
#' type = "r"
#' )
#'
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true") && requireNamespace("rstantools", quietly = TRUE)
#'
#' # ----------------------- Bayesian -------------------------------------
#'
#' # between-subjects
Expand Down Expand Up @@ -140,7 +141,6 @@ oneway_anova <- function(data,
nboot = 100L,
...) {
type <- stats_type_switch(type)

c(x, y) %<-% c(ensym(x), ensym(y))

data %<>% long_to_wide_converter(
Expand All @@ -163,8 +163,6 @@ oneway_anova <- function(data,
# styler: on

if (paired) {
check_if_installed("afex", minimum_version = "1.0-0")

mod <- afex::aov_ez(
id = ".rowid",
dv = as_string(y),
Expand Down
4 changes: 1 addition & 3 deletions R/pairwise_comparisons.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@
#' @references For more, see:
#' <https://indrajeetpatil.github.io/ggstatsplot/articles/web_only/pairwise.html>
#'
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true") && requireNamespace("PMCMRplus", quietly = TRUE)
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true")
#' # for reproducibility
#' set.seed(123)
#' library(statsExpressions)
#' library(PMCMRplus)
#'
#' #------------------- between-subjects design ----------------------------
#'
Expand Down Expand Up @@ -149,7 +148,6 @@ pairwise_comparisons <- function(data,
p.adjust.method = "holm",
k = 2L,
...) {
if (type != "robust") check_if_installed("PMCMRplus", reason = "for pairwise comparisons")
type <- stats_type_switch(type)
c(x, y) %<-% c(ensym(x), ensym(y))

Expand Down
1 change: 0 additions & 1 deletion R/two_sample_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ two_sample_test <- function(data,
nboot = 100L,
...) {
type <- stats_type_switch(type)

c(x, y) %<-% c(ensym(x), ensym(y))

data %<>% long_to_wide_converter(
Expand Down
Loading

0 comments on commit 214b9a5

Please sign in to comment.