Skip to content

Commit

Permalink
cran 0.4.0 submission
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Apr 11, 2020
1 parent 1089a38 commit 576ae2d
Show file tree
Hide file tree
Showing 55 changed files with 145 additions and 171 deletions.
4 changes: 2 additions & 2 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This package was submitted to CRAN on 2020-01-29.
Once it is accepted, delete this file and tag the release (commit de42720a84).
This package was submitted to CRAN on 2020-04-11.
Once it is accepted, delete this file and tag the release (commit 1089a38490).
21 changes: 7 additions & 14 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: statsExpressions
Title: Expressions with Statistical Details
Version: 0.4.0.9000
Version: 0.4.0
Authors@R:
person(given = "Indrajeet",
family = "Patil",
Expand All @@ -21,23 +21,22 @@ URL: https://indrajeetpatil.github.io/statsExpressions,
BugReports:
https://github.com/IndrajeetPatil/statsExpressions/issues
Depends:
R (>= 3.5.0)
R (>= 3.6.0)
Imports:
boot,
broomExtra (>= 2.6.0),
correlation (>= 0.1.1),
broomExtra (>= 3.0.0),
correlation (>= 0.2.0),
dplyr,
effectsize (>= 0.2.9.9),
effectsize (>= 0.3.0),
ez,
ipmisc (>= 1.3.0),
ipmisc (>= 2.0.0),
metafor,
metaplus,
purrr,
rcompanion,
rlang,
stats,
tibble,
tidyBF (>= 0.1.0.9000),
tidyBF (>= 0.2.0),
tidyr,
WRS2
Suggests:
Expand All @@ -48,12 +47,6 @@ Suggests:
testthat
VignetteBuilder:
knitr
Remotes:
easystats/correlation,
easystats/effectsize,
IndrajeetPatil/broomExtra,
IndrajeetPatil/ipmisc,
IndrajeetPatil/tidyBF
Encoding: UTF-8
Language: en-US
LazyData: true
Expand Down
3 changes: 0 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ importFrom(dplyr,recode)
importFrom(dplyr,rename)
importFrom(dplyr,rename_all)
importFrom(dplyr,select)
importFrom(dplyr,tibble)
importFrom(effectsize,cohens_d)
importFrom(effectsize,eta_squared)
importFrom(effectsize,hedges_g)
Expand Down Expand Up @@ -110,8 +109,6 @@ importFrom(stats,na.omit)
importFrom(stats,oneway.test)
importFrom(stats,t.test)
importFrom(stats,wilcox.test)
importFrom(tibble,as_tibble)
importFrom(tibble,tribble)
importFrom(tidyBF,bf_contingency_tab)
importFrom(tidyBF,bf_corr_test)
importFrom(tidyBF,bf_meta)
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# statsExpressions 0.4.0.9000
# statsExpressions 0.4.0

BREAKING CHANGES

Expand All @@ -9,6 +9,8 @@ BREAKING CHANGES

MAJOR CHANGES

- Minimum R version bumped to `R 3.6.0`.

- Retires the internal `effsize_t_parametric` helper function in favor of
relying functions from `effectsize`, which is now added as a dependency.
Similarly, `statsExpressions` now relies on `effectsize` to compute effect
Expand Down
3 changes: 1 addition & 2 deletions R/helpers_contingency_tabs_expressions.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#'
#' @importFrom dplyr select mutate rename filter
#' @importFrom rlang !! enquo as_name ensym exec
#' @importFrom tibble tribble
#' @importFrom tidyr uncount drop_na
#' @importFrom stats mcnemar.test chisq.test
#' @importFrom rcompanion cramerV cohenG cramerVFit
Expand Down Expand Up @@ -109,7 +108,7 @@ expr_contingency_tab <- function(data,
data %<>%
dplyr::select(.data = ., {{ x }}, {{ y }}, {{ counts }}) %>%
tidyr::drop_na(data = .) %>%
tibble::as_tibble(x = .)
as_tibble(x = .)

# x and y need to be factors; drop the unused levels of the factors

Expand Down
1 change: 0 additions & 1 deletion R/helpers_effsize_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#' `95%` lower and upper confidence intervals (`0.95`).
#' @param ... Currently ignored.
#'
#' @importFrom tibble as_tibble
#' @importFrom dplyr select contains
#' @importFrom boot boot
#' @importFrom rlang !! enquo
Expand Down
10 changes: 5 additions & 5 deletions R/helpers_meta_analysis_expressions.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' @inheritDotParams metafor::rma -yi -sei -tau2 -level
#'
#' @importFrom metafor rma
#' @importFrom dplyr rename_all recode mutate tibble
#' @importFrom dplyr rename_all recode mutate
#' @importFrom tidyBF meta_data_check
#'
#' @examples
Expand Down Expand Up @@ -92,7 +92,7 @@ expr_meta_parametric <- function(data,
# create a dataframe with coefficients
df_tidy <-
coef(summary(meta_res)) %>%
tibble::as_tibble(.) %>%
as_tibble(.) %>%
dplyr::rename_all(
.tbl = .,
.funs = dplyr::recode,
Expand Down Expand Up @@ -124,7 +124,7 @@ expr_meta_parametric <- function(data,
df_glance <-
with(
data = meta_res,
expr = dplyr::tibble(
expr = tibble(
tau2 = tau2,
se.tau2 = se.tau2,
k = k,
Expand Down Expand Up @@ -248,8 +248,8 @@ expr_meta_robust <- function(data,
df_tidy <-
meta_res %>% {
dplyr::inner_join(
x = tibble::as_tibble(as.data.frame(.$results), rownames = "term"),
y = tibble::as_tibble(as.data.frame(.$profile@summary@coef), rownames = "term"),
x = as_tibble(as.data.frame(.$results), rownames = "term"),
y = as_tibble(as.data.frame(.$profile@summary@coef), rownames = "term"),
by = "term"
) %>%
dplyr::rename_all(.tbl = ., .funs = tolower) %>%
Expand Down
2 changes: 1 addition & 1 deletion R/helpers_miscellaneous.R
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ rcompanion_cleaner <- function(object) {
if (inherits(object, "list")) object <- object[[1]]

# rename columns uniformly
tibble::as_tibble(object) %>%
as_tibble(object) %>%
dplyr::rename_all(
.tbl = .,
.funs = dplyr::recode,
Expand Down
19 changes: 10 additions & 9 deletions R/helpers_t_test_expressions.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ expr_t_parametric <- function(data,
data %<>%
dplyr::select(.data = ., {{ x }}, {{ y }}) %>%
dplyr::mutate(.data = ., {{ x }} := droplevels(as.factor({{ x }}))) %>%
as_tibble(x = .)
as_tibble(.)

# properly removing NAs if it's a paired design
if (isTRUE(paired)) {
Expand Down Expand Up @@ -363,7 +363,6 @@ expr_t_nonparametric <- function(data,
#' @importFrom dplyr select
#' @importFrom rlang !! enquo
#' @importFrom WRS2 yuen yuen.effect.ci
#' @importFrom tibble tribble
#'
#' @examples
#' \donttest{
Expand Down Expand Up @@ -422,7 +421,7 @@ expr_t_robust <- function(data,
data %<>%
dplyr::select(.data = ., {{ x }}, {{ y }}) %>%
dplyr::mutate(.data = ., {{ x }} := droplevels(as.factor({{ x }}))) %>%
as_tibble(x = .)
as_tibble(.)

# ---------------------------- between-subjects design --------------------

Expand All @@ -446,9 +445,10 @@ expr_t_robust <- function(data,

# effect size dataframe
effsize_df <-
tibble::tribble(
~estimate, ~conf.low, ~conf.high,
effsize_obj$effsize[[1]], effsize_obj$CI[[1]], effsize_obj$CI[[2]]
tibble(
estimate = effsize_obj$effsize[[1]],
conf.low = effsize_obj$CI[[1]],
conf.high = effsize_obj$CI[[2]]
)

# Yuen's test for trimmed means
Expand All @@ -461,9 +461,10 @@ expr_t_robust <- function(data,

# tidying it up
stats_df <-
tibble::tribble(
~statistic, ~parameter, ~p.value,
stats_obj$test[[1]], stats_obj$df[[1]], stats_obj$p.value[[1]]
tibble(
statistic = stats_obj$test[[1]],
parameter = stats_obj$df[[1]],
p.value = stats_obj$p.value[[1]]
)

# subtitle parameters
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Package | Status | Usage | GitHub | References
----------------- | ----------------- | ----------------- | ----------------- | -----------------
[![CRAN_Release_Badge](http://www.r-pkg.org/badges/version-ago/statsExpressions)](https://CRAN.R-project.org/package=statsExpressions) | [![Build Status](https://travis-ci.org/IndrajeetPatil/statsExpressions.svg?branch=master)](https://travis-ci.org/IndrajeetPatil/statsExpressions) | [![Daily downloads badge](https://cranlogs.r-pkg.org/badges/last-day/statsExpressions?color=blue)](https://CRAN.R-project.org/package=statsExpressions) | [![GitHub version](https://img.shields.io/badge/GitHub-0.4.0.9000-orange.svg?style=flat-square)](https://github.com/IndrajeetPatil/statsExpressions/) | [![Website](https://img.shields.io/badge/website-statsExpressions-orange.svg?colorB=E91E63)](https://indrajeetpatil.github.io/statsExpressions/)
[![CRAN Checks](https://cranchecks.info/badges/summary/statsExpressions)](https://cran.r-project.org/web/checks/check_results_statsExpressions.html) | [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/IndrajeetPatil/statsExpressions?branch=master&svg=true)](https://ci.appveyor.com/project/IndrajeetPatil/statsExpressions) | [![Weekly downloads badge](https://cranlogs.r-pkg.org/badges/last-week/statsExpressions?color=blue)](https://CRAN.R-project.org/package=statsExpressions) | [![Forks](https://img.shields.io/badge/forks-`r itdepends:::get_github_info("statsExpressions")$forks[[1]]`-blue.svg)](https://github.com/IndrajeetPatil/statsExpressions/) | [![Features](https://img.shields.io/badge/features-statsExpressions-orange.svg?colorB=2196F3)](https://indrajeetpatil.github.io/statsExpressions/reference/index.html)
[![minimal R version](https://img.shields.io/badge/R%3E%3D-3.5.0-6666ff.svg)](https://cran.r-project.org/) | [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/) | [![Monthly downloads badge](https://cranlogs.r-pkg.org/badges/last-month/statsExpressions?color=blue)](https://CRAN.R-project.org/package=statsExpressions) | [![Github Issues](https://img.shields.io/badge/issues-`r itdepends:::get_github_info("statsExpressions")$open_issues[[1]]`-red.svg)](https://github.com/IndrajeetPatil/statsExpressions/issues) | [![vignettes](https://img.shields.io/badge/vignettes-0.3.1-orange.svg?colorB=FF5722)](https://CRAN.R-project.org/package=statsExpressions/vignettes/)
[![minimal R version](https://img.shields.io/badge/R%3E%3D-3.6.0-6666ff.svg)](https://cran.r-project.org/) | [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/) | [![Monthly downloads badge](https://cranlogs.r-pkg.org/badges/last-month/statsExpressions?color=blue)](https://CRAN.R-project.org/package=statsExpressions) | [![Github Issues](https://img.shields.io/badge/issues-`r itdepends:::get_github_info("statsExpressions")$open_issues[[1]]`-red.svg)](https://github.com/IndrajeetPatil/statsExpressions/issues) | [![vignettes](https://img.shields.io/badge/vignettes-0.4.0-orange.svg?colorB=FF5722)](https://CRAN.R-project.org/package=statsExpressions/vignettes/)
[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/IndrajeetPatil/statsExpressions.svg)](https://github.com/IndrajeetPatil/statsExpressions) | [![Coverage Status](https://coveralls.io/repos/github/IndrajeetPatil/statsExpressions/badge.svg?branch=master)](https://coveralls.io/github/IndrajeetPatil/statsExpressions?branch=master) | [![Total downloads badge](https://cranlogs.r-pkg.org/badges/grand-total/statsExpressions?color=blue)](https://CRAN.R-project.org/package=statsExpressions) | [![Github Stars](https://img.shields.io/github/stars/IndrajeetPatil/statsExpressions.svg?style=social&label=Github)](https://github.com/IndrajeetPatil/statsExpressions) | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2074621.svg)](https://doi.org/10.5281/zenodo.3386122)
[![Licence](https://img.shields.io/badge/licence-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) | [![Codecov test coverage](https://codecov.io/gh/IndrajeetPatil/statsExpressions/branch/master/graph/badge.svg)](https://codecov.io/gh/IndrajeetPatil/statsExpressions?branch=master) | [![Covrpage Summary](https://img.shields.io/badge/covrpage-Last_Build_2020_03_22-yellowgreen.svg)](https://github.com/IndrajeetPatil/statsExpressions/blob/master/tests/README.md) | [![Last-changedate](https://img.shields.io/badge/last%20change-`r gsub('-', '--', Sys.Date())`-yellowgreen.svg)](https://github.com/IndrajeetPatil/statsExpressions/commits/master) | [![GitHub last commit](https://img.shields.io/github/last-commit/IndrajeetPatil/statsExpressions.svg)](https://github.com/IndrajeetPatil/statsExpressions/commits/master)
[![status](https://tinyverse.netlify.com/badge/statsExpressions)](https://CRAN.R-project.org/package=statsExpressions) | [![R build status](https://github.com/IndrajeetPatil/statsExpressions/workflows/R-CMD-check/badge.svg)](https://github.com/IndrajeetPatil/statsExpressions) | [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/statsExpressions/community) | [![Project Status](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) | [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/IndrajeetPatil/statsExpressions/issues)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [![CRAN\_Release\_Badge](http://www.r-pkg.org/badges/version-ago/statsExpressions)](https://CRAN.R-project.org/package=statsExpressions) | [![Build Status](https://travis-ci.org/IndrajeetPatil/statsExpressions.svg?branch=master)](https://travis-ci.org/IndrajeetPatil/statsExpressions) | [![Daily downloads badge](https://cranlogs.r-pkg.org/badges/last-day/statsExpressions?color=blue)](https://CRAN.R-project.org/package=statsExpressions) | [![GitHub version](https://img.shields.io/badge/GitHub-0.4.0.9000-orange.svg?style=flat-square)](https://github.com/IndrajeetPatil/statsExpressions/) | [![Website](https://img.shields.io/badge/website-statsExpressions-orange.svg?colorB=E91E63)](https://indrajeetpatil.github.io/statsExpressions/) |
| [![CRAN Checks](https://cranchecks.info/badges/summary/statsExpressions)](https://cran.r-project.org/web/checks/check_results_statsExpressions.html) | [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/IndrajeetPatil/statsExpressions?branch=master&svg=true)](https://ci.appveyor.com/project/IndrajeetPatil/statsExpressions) | [![Weekly downloads badge](https://cranlogs.r-pkg.org/badges/last-week/statsExpressions?color=blue)](https://CRAN.R-project.org/package=statsExpressions) | [![Forks](https://img.shields.io/badge/forks-5-blue.svg)](https://github.com/IndrajeetPatil/statsExpressions/) | [![Features](https://img.shields.io/badge/features-statsExpressions-orange.svg?colorB=2196F3)](https://indrajeetpatil.github.io/statsExpressions/reference/index.html) |
| [![minimal R version](https://img.shields.io/badge/R%3E%3D-3.5.0-6666ff.svg)](https://cran.r-project.org/) | [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/) | [![Monthly downloads badge](https://cranlogs.r-pkg.org/badges/last-month/statsExpressions?color=blue)](https://CRAN.R-project.org/package=statsExpressions) | [![Github Issues](https://img.shields.io/badge/issues-6-red.svg)](https://github.com/IndrajeetPatil/statsExpressions/issues) | [![vignettes](https://img.shields.io/badge/vignettes-0.3.1-orange.svg?colorB=FF5722)](https://CRAN.R-project.org/package=statsExpressions/vignettes/) |
| [![minimal R version](https://img.shields.io/badge/R%3E%3D-3.6.0-6666ff.svg)](https://cran.r-project.org/) | [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/) | [![Monthly downloads badge](https://cranlogs.r-pkg.org/badges/last-month/statsExpressions?color=blue)](https://CRAN.R-project.org/package=statsExpressions) | [![Github Issues](https://img.shields.io/badge/issues-6-red.svg)](https://github.com/IndrajeetPatil/statsExpressions/issues) | [![vignettes](https://img.shields.io/badge/vignettes-0.4.0-orange.svg?colorB=FF5722)](https://CRAN.R-project.org/package=statsExpressions/vignettes/) |
| [![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/IndrajeetPatil/statsExpressions.svg)](https://github.com/IndrajeetPatil/statsExpressions) | [![Coverage Status](https://coveralls.io/repos/github/IndrajeetPatil/statsExpressions/badge.svg?branch=master)](https://coveralls.io/github/IndrajeetPatil/statsExpressions?branch=master) | [![Total downloads badge](https://cranlogs.r-pkg.org/badges/grand-total/statsExpressions?color=blue)](https://CRAN.R-project.org/package=statsExpressions) | [![Github Stars](https://img.shields.io/github/stars/IndrajeetPatil/statsExpressions.svg?style=social&label=Github)](https://github.com/IndrajeetPatil/statsExpressions) | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2074621.svg)](https://doi.org/10.5281/zenodo.3386122) |
| [![Licence](https://img.shields.io/badge/licence-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) | [![Codecov test coverage](https://codecov.io/gh/IndrajeetPatil/statsExpressions/branch/master/graph/badge.svg)](https://codecov.io/gh/IndrajeetPatil/statsExpressions?branch=master) | [![Covrpage Summary](https://img.shields.io/badge/covrpage-Last_Build_2020_03_22-yellowgreen.svg)](https://github.com/IndrajeetPatil/statsExpressions/blob/master/tests/README.md) | [![Last-changedate](https://img.shields.io/badge/last%20change-2020--04--08-yellowgreen.svg)](https://github.com/IndrajeetPatil/statsExpressions/commits/master) | [![GitHub last commit](https://img.shields.io/github/last-commit/IndrajeetPatil/statsExpressions.svg)](https://github.com/IndrajeetPatil/statsExpressions/commits/master) |
| [![Licence](https://img.shields.io/badge/licence-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) | [![Codecov test coverage](https://codecov.io/gh/IndrajeetPatil/statsExpressions/branch/master/graph/badge.svg)](https://codecov.io/gh/IndrajeetPatil/statsExpressions?branch=master) | [![Covrpage Summary](https://img.shields.io/badge/covrpage-Last_Build_2020_03_22-yellowgreen.svg)](https://github.com/IndrajeetPatil/statsExpressions/blob/master/tests/README.md) | [![Last-changedate](https://img.shields.io/badge/last%20change-2020--04--11-yellowgreen.svg)](https://github.com/IndrajeetPatil/statsExpressions/commits/master) | [![GitHub last commit](https://img.shields.io/github/last-commit/IndrajeetPatil/statsExpressions.svg)](https://github.com/IndrajeetPatil/statsExpressions/commits/master) |
| [![status](https://tinyverse.netlify.com/badge/statsExpressions)](https://CRAN.R-project.org/package=statsExpressions) | [![R build status](https://github.com/IndrajeetPatil/statsExpressions/workflows/R-CMD-check/badge.svg)](https://github.com/IndrajeetPatil/statsExpressions) | [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/statsExpressions/community) | [![Project Status](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) | [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/IndrajeetPatil/statsExpressions/issues) |

# Introduction
Expand Down
Loading

1 comment on commit 576ae2d

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/helpers_anova_expressions.R:81:1: style: functions should have cyclomatic complexity of less than 15, this has 18.

expr_anova_parametric <- function(data,
^

R/helpers_contingency_tabs_expressions.R:84:1: style: functions should have cyclomatic complexity of less than 15, this has 16.

expr_contingency_tab <- function(data,
^

Please sign in to comment.