Skip to content

Commit

Permalink
get rid of MCMCpack
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Dec 16, 2019
1 parent a4a465e commit 584e091
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 40 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Imports:
dplyr (>= 0.8.3),
ez (>= 4.4-0),
groupedstats (>= 0.1.0),
MCMCpack (>= 1.4-5),
psych (>= 1.8.12),
rcompanion (>= 2.3.7),
rlang (>= 0.4.2),
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ importFrom(BayesFactor,correlationBF)
importFrom(BayesFactor,extractBF)
importFrom(BayesFactor,logMeanExpLogs)
importFrom(BayesFactor,ttestBF)
importFrom(MCMCpack,rdirichlet)
importFrom(WRS2,onesampb)
importFrom(WRS2,pbcor)
importFrom(WRS2,rmanova)
Expand Down Expand Up @@ -120,6 +119,7 @@ importFrom(stats,na.omit)
importFrom(stats,oneway.test)
importFrom(stats,pt)
importFrom(stats,qt)
importFrom(stats,rgamma)
importFrom(stats,t.test)
importFrom(stats,uniroot)
importFrom(stats,wilcox.test)
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# statsExpressions 0.1.2.9000

- Removes `MCMCpack` from `Depends`.

# statsExpressions 0.1.2

- Maintenance release to fix additional check issues on CRAN.
- Maintenance release to fix additional check issues on `CRAN`.

# statsExpressions 0.1.1

Expand Down
14 changes: 11 additions & 3 deletions R/helpers_bf_tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,7 @@ bf_corr_test <- function(data,
#' (1974) `"a"` parameter.
#'
#' @importFrom BayesFactor contingencyTableBF logMeanExpLogs
#' @importFrom stats dmultinom
#' @importFrom MCMCpack rdirichlet
#' @importFrom stats dmultinom rgamma
#' @importFrom dplyr pull select rename mutate
#' @importFrom tidyr uncount drop_na
#'
Expand Down Expand Up @@ -415,7 +414,16 @@ bf_contingency_tab <- function(data,

# estimate log prob of data under null with Monte Carlo
M <- 100000
p1s <- MCMCpack::rdirichlet(n = M, alpha = prior.concentration * ratio)

# rdirichlet function
rdirichlet_int <- function(n, alpha) {
l <- length(alpha)
x <- matrix(stats::rgamma(l * n, alpha), ncol = l, byrow = TRUE)
sm <- x %*% rep(1, l)
return(x / as.vector(sm))
}
p1s <- rdirichlet_int(n = M, alpha = prior.concentration * ratio)

tmp_pr_h1 <-
sapply(
X = 1:M,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| [![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-1-blue.svg)](https://github.com/IndrajeetPatil/statsExpressions/) | [![Rdoc](https://www.rdocumentation.org/badges/version/statsExpressions)](https://www.rdocumentation.org/packages/statsExpressions) |
| [![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-7-red.svg)](https://github.com/IndrajeetPatil/statsExpressions/issues) | [![vignettes](https://img.shields.io/badge/vignettes-0.1.2-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) | [![HitCount](http://hits.dwyl.io/IndrajeetPatil/statsExpressions.svg)](http://hits.dwyl.io/IndrajeetPatil/statsExpressions) | [![Last-changedate](https://img.shields.io/badge/last%20change-2019--12--13-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) | [![HitCount](http://hits.dwyl.io/IndrajeetPatil/statsExpressions.svg)](http://hits.dwyl.io/IndrajeetPatil/statsExpressions) | [![Last-changedate](https://img.shields.io/badge/last%20change-2019--12--16-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) | [![Covrpage Summary](https://img.shields.io/badge/covrpage-Last_Build_2019_12_12-yellowgreen.svg)](https://github.com/IndrajeetPatil/statsExpressions/blob/master/tests/README.md) | [![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
15 changes: 1 addition & 14 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"issueTracker": "\n https://github.com/IndrajeetPatil/statsExpressions/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.1.2",
"version": "0.1.2.9000",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -219,19 +219,6 @@
},
"sameAs": "https://CRAN.R-project.org/package=groupedstats"
},
{
"@type": "SoftwareApplication",
"identifier": "MCMCpack",
"name": "MCMCpack",
"version": ">= 1.4-5",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=MCMCpack"
},
{
"@type": "SoftwareApplication",
"identifier": "psych",
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/stats_details.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/tests_and_coverage.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/Titanic_full.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/VR_dilemma.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/bugs_long.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/intent_morality.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/iris_long.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

2 comments on commit 584e091

@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:80:1: style: functions should have cyclomatic complexity of less than 15, this has 19.

expr_anova_parametric <- function(data,
^

R/helpers_effsize_ci.R:101:1: style: functions should have cyclomatic complexity of less than 15, this has 20.

effsize_t_parametric <- function(formula = NULL,
^

@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:80:1: style: functions should have cyclomatic complexity of less than 15, this has 19.

expr_anova_parametric <- function(data,
^

R/helpers_effsize_ci.R:101:1: style: functions should have cyclomatic complexity of less than 15, this has 20.

effsize_t_parametric <- function(formula = NULL,
^

Please sign in to comment.