Skip to content

Commit

Permalink
Upkeep (#254)
Browse files Browse the repository at this point in the history
* remove date and author metadata from vignettes

* bump to devel

* update linter config

* rename for effect size names

* fix precommit workflow

* use autoglobals tag

* Update styler.yaml
  • Loading branch information
IndrajeetPatil authored Sep 22, 2023
1 parent 86be583 commit de77bdc
Show file tree
Hide file tree
Showing 28 changed files with 110 additions and 73 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
^CRAN-RELEASE$
^CRAN-SUBMISSION$
^LICENSE\.md$
^Makefile$
^Meta$
^NEWS$
^README-.*\.png$
Expand Down Expand Up @@ -48,4 +49,5 @@
hextools
publication/*
references.bib
shell
tests\^spelling
1 change: 1 addition & 0 deletions .github/workflows/lint-changed-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
commented_code_linter = NULL,
cyclocomp_linter(25L),
extraction_operator_linter = NULL,
if_not_else_linter(exceptions = character(0L)),
implicit_integer_linter = NULL,
library_call_linter = NULL,
line_length_linter(120L),
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
commented_code_linter = NULL,
cyclocomp_linter(25L),
extraction_operator_linter = NULL,
if_not_else_linter(exceptions = character(0L)),
implicit_integer_linter = NULL,
library_call_linter = NULL,
line_length_linter(120L),
Expand All @@ -62,3 +63,5 @@ jobs:
defaults = linters_with_tags(tags = NULL)
))
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
1 change: 1 addition & 0 deletions .github/workflows/styler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
r-lib/pkgapi
r-lib/styler
r-lib/roxygen2
anthonynorth/roxyglobals
needs: |
styler
roxygen2
Expand Down
1 change: 1 addition & 0 deletions .lintr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ linters: linters_with_defaults(
commented_code_linter = NULL,
cyclocomp_linter(25L),
extraction_operator_linter = NULL,
if_not_else_linter(exceptions = character(0L)),
implicit_integer_linter = NULL,
library_call_linter = NULL,
line_length_linter(120L),
Expand Down
20 changes: 10 additions & 10 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ message: 'To cite package "statsExpressions" in publications use:'
type: software
license: GPL-3.0-only
title: 'statsExpressions: Tidy Dataframes and Expressions with Statistical Details'
version: 1.5.2
version: 1.5.2.9000
doi: 10.21105/joss.03236
abstract: 'Utilities for producing dataframes with rich details for the most common
types of statistical approaches and tests: parametric, nonparametric, robust, and
Expand Down Expand Up @@ -110,7 +110,7 @@ references:
given-names: Jeffrey N.
email: [email protected]
year: '2023'
version: '>= 0.9.12-4.4'
version: '>= 0.9.12-4.5'
- type: software
title: correlation
abstract: 'correlation: Methods for Correlation Analysis'
Expand Down Expand Up @@ -149,7 +149,7 @@ references:
abstract: 'datawizard: Easy Data Wrangling and Statistical Transformations'
notes: Imports
url: https://easystats.github.io/datawizard/
repository: https://easystats.r-universe.dev
repository: https://CRAN.R-project.org/package=datawizard
authors:
- family-names: Patil
given-names: Indrajeet
Expand All @@ -176,7 +176,7 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0001-9560-6336
year: '2023'
version: '>= 0.8.0'
version: '>= 0.9.0'
- type: software
title: dplyr
abstract: 'dplyr: A Grammar of Data Manipulation'
Expand Down Expand Up @@ -234,7 +234,7 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0003-4315-6788
year: '2023'
version: '>= 0.8.5'
version: '>= 0.8.6'
- type: software
title: glue
abstract: 'glue: Interpreted String Literals'
Expand All @@ -255,7 +255,7 @@ references:
abstract: 'insight: Easy Access to Model Information for Various Model Objects'
notes: Imports
url: https://easystats.github.io/insight/
repository: https://CRAN.R-project.org/package=insight
repository: https://easystats.r-universe.dev
authors:
- family-names: Lüdecke
given-names: Daniel
Expand Down Expand Up @@ -290,7 +290,7 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0002-9271-5075
year: '2023'
version: '>= 0.19.4'
version: '>= 0.19.5'
- type: software
title: magrittr
abstract: 'magrittr: A Forward-Pipe Operator for R'
Expand Down Expand Up @@ -369,7 +369,7 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0001-9560-6336
year: '2023'
version: '>= 0.10.4'
version: '>= 0.10.5'
- type: software
title: PMCMRplus
abstract: 'PMCMRplus: Calculate Pairwise Multiple Comparisons of Mean Rank Sums
Expand Down Expand Up @@ -589,12 +589,12 @@ references:
title: metaBMA
abstract: 'metaBMA: Bayesian Model Averaging for Random and Fixed Effects Meta-Analysis'
notes: Suggests
url: https://github.com/danheck/metaBMA
url: https://danheck.github.io/metaBMA/
repository: https://CRAN.R-project.org/package=metaBMA
authors:
- family-names: Heck
given-names: Daniel W.
email: dheck@uni-marburg.de
email: daniel.heck@uni-marburg.de
orcid: https://orcid.org/0000-0002-6302-9252
year: '2023'
- type: software
Expand Down
15 changes: 9 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ Depends:
R (>= 4.1.0)
Imports:
afex (>= 1.3-0),
BayesFactor (>= 0.9.12-4.4),
BayesFactor (>= 0.9.12-4.5),
correlation (>= 0.8.4),
datawizard (>= 0.8.0),
datawizard (>= 0.9.0),
dplyr (>= 1.1.3),
effectsize (>= 0.8.5),
effectsize (>= 0.8.6),
glue,
insight (>= 0.19.4),
insight (>= 0.19.5),
magrittr,
parameters (>= 0.21.1),
performance (>= 0.10.5),
Expand Down Expand Up @@ -62,8 +62,11 @@ VignetteBuilder:
Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE, roclets = c("rd", "namespace", "collate",
"pkgapi::api_roclet"))
Roxygen: list(
markdown = TRUE,
roclets = c("collate", "namespace", "rd", "pkgapi::api_roclet", "roxyglobals::global_roclet")
)
RoxygenNote: 7.2.3.9000
Config/testthat/edition: 3
Config/testthat/parallel: true
Config/Needs/check: anthonynorth/roxyglobals
2 changes: 2 additions & 0 deletions R/add_expression_col.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
#' @inheritParams oneway_anova
#' @inheritParams long_to_wide_converter
#'
#' @autoglobal
#'
#' @examples
#' set.seed(123)
#'
Expand Down
2 changes: 2 additions & 0 deletions R/centrality_description.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#' @inheritParams oneway_anova
#' @param ... Currently ignored.
#'
#' @autoglobal
#'
#' @example man/examples/examples-centrality_description.R
#' @export
centrality_description <- function(data,
Expand Down
2 changes: 2 additions & 0 deletions R/contingency_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
#' @inheritParams stats::chisq.test
#' @inheritParams oneway_anova
#'
#' @autoglobal
#'
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true")
#' # for reproducibility
#' set.seed(123)
Expand Down
2 changes: 2 additions & 0 deletions R/corr_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#' be plotted on the `y`-axis.
#' @inheritParams oneway_anova
#'
#' @autoglobal
#'
#' @example man/examples/examples-corr_test.R
#' @export
corr_test <- function(data,
Expand Down
41 changes: 0 additions & 41 deletions R/global_vars.R

This file was deleted.

35 changes: 35 additions & 0 deletions R/globals.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Generated by roxyglobals: do not edit by hand

utils::globalVariables(c(
"method", # <add_expression_col>
"effectsize", # <add_expression_col>
"n.obs", # <add_expression_col>
"df", # <add_expression_col>
"n.obs", # <centrality_description>
"estimate", # <centrality_description>
".counts", # <contingency_table>
".f", # <contingency_table>
".f.es", # <contingency_table>
".", # <tidy_model_parameters>
"r.squared", # <tidy_model_parameters>
".", # <tidy_model_effectsize>
".rowid", # <long_to_wide_converter>
"nested_data", # <long_to_wide_converter>
".ns", # <meta_analysis>
".fn", # <meta_analysis>
".f.args", # <meta_analysis>
".rowid", # <oneway_anova>
"k.df", # <oneway_anova>
"k.df.error", # <oneway_anova>
".f", # <oneway_anova>
".rowid", # <pairwise_comparisons>
".f", # <pairwise_comparisons>
"group1", # <pairwise_comparisons>
"group2", # <pairwise_comparisons>
".ns", # <pairwise_comparisons>
".fn", # <pairwise_comparisons>
"term", # <pairwise_comparisons>
"p.value", # <pairwise_comparisons>
"term", # <tidy_model_expressions>
NULL
))
6 changes: 5 additions & 1 deletion R/helpers_easystats.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#'
#' @inheritParams parameters::model_parameters
#'
#' @autoglobal
#'
#' @examples
#' model <- lm(mpg ~ wt + cyl, data = mtcars)
#' tidy_model_parameters(model)
Expand All @@ -12,7 +14,7 @@ tidy_model_parameters <- function(model, ...) {
mutate(conf.method = . %@% "ci_method") %>%
select(-matches("Difference")) %>%
standardize_names(style = "broom") %>%
rename_all(~ gsub("cramers.", "", .x)) %>%
rename_all(~ gsub("cramers.|omega2.|eta2.", "", .x)) %>%
rename_with(recode, bayes.factor = "bf10") %>%
tidyr::fill(matches("^prior|^bf"), .direction = "updown") %>%
mutate(across(matches("bf10"), ~ log(.x), .names = "log_e_{.col}"))
Expand Down Expand Up @@ -46,6 +48,8 @@ tidy_model_parameters <- function(model, ...) {
#' @param data A data frame returned by `{effectsize}` functions.
#' @param ... Currently ignored.
#'
#' @autoglobal
#'
#' @examples
#' df <- effectsize::cohens_d(sleep$extra, sleep$group)
#' tidy_model_effectsize(df)
Expand Down
2 changes: 2 additions & 0 deletions R/long_to_wide_converter.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#' @returns A data frame with `NA`s removed while respecting the
#' between-or-within-subjects nature of the dataset.
#'
#' @autoglobal
#'
#' @examples
#' # for reproducibility
#' library(statsExpressions)
Expand Down
2 changes: 2 additions & 0 deletions R/meta_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#' needed package (`{metafor}`, `{metaplus}`, or `{metaBMA}`) for meta-analysis.
#' If they are not available, you will be asked to install them.
#'
#' @autoglobal
#'
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true") && requireNamespace("metafor", quietly = TRUE)
#' # setup
#' set.seed(123)
Expand Down
2 changes: 2 additions & 0 deletions R/one_sample_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#' ```{r child="man/rmd-fragments/return.Rmd"}
#' ```
#'
#' @autoglobal
#'
#' @example man/examples/examples-one_sample_test.R
#' @export
one_sample_test <- function(data,
Expand Down
2 changes: 2 additions & 0 deletions R/oneway_anova.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
#' @param ... Additional arguments (currently ignored).
#' @inheritParams stats::oneway.test
#'
#' @autoglobal
#'
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true")
#' # for reproducibility
#' set.seed(123)
Expand Down
2 changes: 2 additions & 0 deletions R/pairwise_comparisons.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#' @references For more, see:
#' <https://indrajeetpatil.github.io/ggstatsplot/articles/web_only/pairwise.html>
#'
#' @autoglobal
#'
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true")
#' # for reproducibility
#' set.seed(123)
Expand Down
2 changes: 2 additions & 0 deletions R/switch_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#'
#' You can specify just the initial letter.
#'
#' @autoglobal
#'
#' @examples
#' stats_type_switch("p")
#' stats_type_switch("bf")
Expand Down
2 changes: 2 additions & 0 deletions R/tidy_model_expressions.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#' This is an **experimental** function and may change in the future. Please do
#' not use it yet in your workflow.
#'
#' @autoglobal
#'
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true")
#' # setup
#' set.seed(123)
Expand Down
3 changes: 3 additions & 0 deletions R/two_sample_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@
#' ```{r child="man/rmd-fragments/return.Rmd"}
#' ```
#'
#' @autoglobal
#'
#' @examplesIf identical(Sys.getenv("NOT_CRAN"), "true")
#' @example man/examples/examples-two_sample_test_within.R
#' @example man/examples/examples-two_sample_test_between.R
#'
#' @export
two_sample_test <- function(data,
x,
Expand Down
2 changes: 0 additions & 2 deletions WIP/gallery.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
title: "Gallery of examples"
author: "Indrajeet Patil"
date: "`r Sys.Date()`"
output:
rmarkdown::html_vignette:
fig_width: 6
Expand Down
Loading

0 comments on commit de77bdc

Please sign in to comment.