Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Dec 29, 2020
1 parent 8aba7bc commit 1ccef86
Show file tree
Hide file tree
Showing 12 changed files with 108 additions and 109 deletions.
1 change: 1 addition & 0 deletions R/global_vars.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ utils::globalVariables(
"hpd95_upper",
"prior.parameter",
"prior.scale",
"prior.type",
".counts"
),
package = "tidyBF",
Expand Down
16 changes: 7 additions & 9 deletions R/helpers_bf_tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,11 @@ bf_extractor <- function(bf.object,
)) %>%
insight::standardize_names(data = ., style = "broom") %>%
as_tibble(.) %>%
dplyr::rename(.data = ., "bf10" = "bayes.factor") %>%
dplyr::mutate(.data = ., log_e_bf10 = log(bf10))
dplyr::rename("bf10" = "bayes.factor") %>%
dplyr::mutate(log_e_bf10 = log(bf10))

# expression parameter defaults
prior.type <- quote(italic("r")["Cauchy"]^"JZS")
estimate.type <- quote(italic(delta))
c(prior.type, estimate.type) %<-% c(quote(italic("r")["Cauchy"]^"JZS"), quote(italic(delta)))

# ------------------------ BayesFactor ---------------------------------

Expand All @@ -97,23 +96,22 @@ bf_extractor <- function(bf.object,
# for within-subjects design, retain only marginal component
if ("component" %in% names(df_r2)) {
df_r2 %<>%
dplyr::filter(.data = ., component == "conditional") %>%
dplyr::rename(.data = ., "r2.component" = "component")
dplyr::filter(component == "conditional") %>%
dplyr::rename("r2.component" = "component")
}

# combine everything
df %<>% dplyr::bind_cols(., df_r2)

# for expression
c(centrality, conf.method) %<-% c("median", "hdi")
estimate.type <- quote(italic(R^"2"))
c(centrality, conf.method, estimate.type) %<-% c("median", "hdi", quote(italic(R^"2")))

# prior
df_prior <-
insight::get_priors(bf.object) %>%
dplyr::rename_with(.fn = ~ paste0("Prior_", .x), .cols = dplyr::everything()) %>%
insight::standardize_names(., style = "broom") %>%
dplyr::filter(.data = ., prior.parameter == "fixed")
dplyr::filter(prior.parameter == "fixed")

# merge the parameters dataframe with prior dataframe
df <- dplyr::bind_cols(dplyr::select(df, -dplyr::contains("prior.")), df_prior)
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](https://www.r-pkg.org/badges/version-ago/tidyBF)](https://CRAN.R-project.org/package=tidyBF) | [![Travis Build Status](https://travis-ci.org/IndrajeetPatil/tidyBF.svg?branch=master)](https://travis-ci.org/IndrajeetPatil/tidyBF) | [![Daily downloads badge](https://cranlogs.r-pkg.org/badges/last-day/tidyBF?color=blue)](https://CRAN.R-project.org/package=tidyBF) | [![GitHub version](https://img.shields.io/badge/GitHub-0.4.0.9000-orange.svg?style=flat-square)](https://github.com/IndrajeetPatil/tidyBF/) | [![Website](https://img.shields.io/badge/website-tidyBF-orange.svg?colorB=E91E63)](https://indrajeetpatil.github.io/tidyBF/) |
| [![CRAN Checks](https://cranchecks.info/badges/summary/tidyBF)](https://cran.r-project.org/web/checks/check_results_tidyBF.html) | [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/IndrajeetPatil/tidyBF?branch=master&svg=true)](https://ci.appveyor.com/project/IndrajeetPatil/tidyBF) | [![Weekly downloads badge](https://cranlogs.r-pkg.org/badges/last-week/tidyBF?color=blue)](https://CRAN.R-project.org/package=tidyBF) | [![Forks](https://img.shields.io/badge/forks-1-blue.svg)](https://github.com/IndrajeetPatil/tidyBF/) | [![Features](https://img.shields.io/badge/features-tidyBF-orange.svg?colorB=2196F3)](https://indrajeetpatil.github.io/tidyBF/reference/index.html) |
| [![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/tidyBF?color=blue)](https://CRAN.R-project.org/package=tidyBF) | [![Github Issues](https://img.shields.io/badge/issues-2-red.svg)](https://github.com/IndrajeetPatil/tidyBF/issues) | [![vignettes](https://img.shields.io/badge/vignettes-0.4.0-orange.svg?colorB=FF5722)](https://indrajeetpatil.github.io/statsExpressions/articles/) |
| [![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/tidyBF?color=blue)](https://CRAN.R-project.org/package=tidyBF) | [![Github Issues](https://img.shields.io/badge/issues-1-red.svg)](https://github.com/IndrajeetPatil/tidyBF/issues) | [![vignettes](https://img.shields.io/badge/vignettes-0.4.0-orange.svg?colorB=FF5722)](https://indrajeetpatil.github.io/statsExpressions/articles/) |
| [![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/IndrajeetPatil/tidyBF.svg)](https://github.com/IndrajeetPatil/tidyBF) | [![Coverage Status](https://coveralls.io/repos/github/IndrajeetPatil/tidyBF/badge.svg?branch=master)](https://coveralls.io/github/IndrajeetPatil/tidyBF?branch=master) | [![Total downloads badge](https://cranlogs.r-pkg.org/badges/grand-total/tidyBF?color=blue)](https://CRAN.R-project.org/package=tidyBF) | [![Github Stars](https://img.shields.io/github/stars/IndrajeetPatil/tidyBF.svg?style=social&label=Github)](https://github.com/IndrajeetPatil/tidyBF) | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2074621.svg)](https://doi.org/10.5281/zenodo.2074621) |
| [![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/tidyBF/branch/master/graph/badge.svg)](https://codecov.io/gh/IndrajeetPatil/tidyBF?branch=master) | [![HitCount](https://hits.dwyl.com/IndrajeetPatil/tidyBF.svg)](https://hits.dwyl.com/IndrajeetPatil/tidyBF) | [![Last-changedate](https://img.shields.io/badge/last%20change-2020--12--18-yellowgreen.svg)](https://github.com/IndrajeetPatil/tidyBF/commits/master) | [![GitHub last commit](https://img.shields.io/github/last-commit/IndrajeetPatil/tidyBF.svg)](https://github.com/IndrajeetPatil/tidyBF/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/tidyBF/branch/master/graph/badge.svg)](https://codecov.io/gh/IndrajeetPatil/tidyBF?branch=master) | [![HitCount](https://hits.dwyl.com/IndrajeetPatil/tidyBF.svg)](https://hits.dwyl.com/IndrajeetPatil/tidyBF) | [![Last-changedate](https://img.shields.io/badge/last%20change-2020--12--29-yellowgreen.svg)](https://github.com/IndrajeetPatil/tidyBF/commits/master) | [![GitHub last commit](https://img.shields.io/github/last-commit/IndrajeetPatil/tidyBF.svg)](https://github.com/IndrajeetPatil/tidyBF/commits/master) |
| [![status](https://tinyverse.netlify.com/badge/tidyBF)](https://CRAN.R-project.org/package=tidyBF) | [![R build status](https://github.com/IndrajeetPatil/tidyBF/workflows/R-CMD-check/badge.svg)](https://github.com/IndrajeetPatil/tidyBF) | [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/tidyBF/community) | [![Project Status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) | [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/IndrajeetPatil/tidyBF/issues) |

# Overview <img src="man/figures/logo.png" align="right" width="240" />
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"fileSize": "1699.353KB",
"fileSize": "1718.575KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down
4 changes: 2 additions & 2 deletions docs/index.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/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pandoc: 2.11.3.1
pkgdown: 1.6.1.9000
pkgdown_sha: e5847476d79f08b4cdca0ed5cc55bf55fc18a161
articles: {}
last_built: 2020-12-23T08:37Z
last_built: 2020-12-29T11:12Z
urls:
reference: https://indrajeetpatil.github.io/tidyBF//reference
article: https://indrajeetpatil.github.io/tidyBF//articles
Expand Down
14 changes: 7 additions & 7 deletions docs/reference/bf_contingency_tab.html

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

Loading

0 comments on commit 1ccef86

Please sign in to comment.