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

Commit

Permalink
remove tibble dependence
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Apr 7, 2020
1 parent 703dc5b commit 79e5268
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
config:
- {os: windows-latest, r: '3.6', args: "--no-manual"}
- {os: windows-latest, r: 'devel', args: "--no-manual"}
#- {os: windows-latest, r: 'devel', args: "--no-manual"}
- {os: macOS-latest, r: '3.6', args: "--no-manual"}
#- {os: macOS-latest, r: 'devel', args: "--no-manual"}
- {os: ubuntu-16.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest", args: "--no-manual"}
Expand Down
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Imports:
ipmisc,
metaBMA,
rlang,
tibble,
tidyr
Suggests:
ggplot2,
Expand Down
5 changes: 2 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ importFrom(ipmisc,"%$%")
importFrom(ipmisc,"%<-%")
importFrom(ipmisc,"%<>%")
importFrom(ipmisc,"%>%")
importFrom(ipmisc,as_tibble)
importFrom(ipmisc,blue)
importFrom(ipmisc,long_to_wide_converter)
importFrom(ipmisc,red)
importFrom(ipmisc,signif_column)
importFrom(ipmisc,specify_decimal_p)
importFrom(ipmisc,tibble)
importFrom(metaBMA,meta_random)
importFrom(metaBMA,prior)
importFrom(rlang,"!!")
Expand All @@ -53,8 +55,5 @@ importFrom(rlang,enquo)
importFrom(rlang,ensym)
importFrom(rlang,new_formula)
importFrom(rlang,quo_is_null)
importFrom(tibble,as_tibble)
importFrom(tibble,enframe)
importFrom(tibble,tibble)
importFrom(tidyr,drop_na)
importFrom(tidyr,uncount)
7 changes: 4 additions & 3 deletions R/bf_corr_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,21 @@
#' # for reproducibility
#' set.seed(123)
#'
#' # to get caption (default)
#' # to see results
#' bf_corr_test(
#' data = anscombe,
#' x = x1,
#' y = y4,
#' bf.prior = 1
#' )
#'
#' # to see results
#' # to get caption
#' bf_corr_test(
#' data = anscombe,
#' x = x1,
#' y = y4,
#' bf.prior = 0.8
#' bf.prior = 0.8,
#' output = "null"
#' )
#' @export

Expand Down
13 changes: 5 additions & 8 deletions R/helpers_bf_tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
#' @param ... Currently ignored.
#'
#' @importFrom BayesFactor extractBF
#' @importFrom tibble enframe
#' @importFrom dplyr rename select mutate
#'
#' @note *Important*: don't enter `1/bf_obj` to extract results for null
#' hypothesis; # doing so will return wrong results.
#'
#' @examples
#' set.seed(123)
#'
Expand All @@ -20,8 +22,6 @@
#' )
#'
#' # extracting Bayes Factors in a dataframe
#' # *important*: don't enter `1/bf_obj` to extract results for null hypothesis;
#' # doing so will return wrong results
#' bf_extractor(bf_obj)
#' @export

Expand Down Expand Up @@ -72,17 +72,14 @@ bf_extractor <- function(bf.object, ...) {
#'
#' # creating caption (for null)
#' bf_expr(
#' bf.df = bf.df,
#' bf.df,
#' output = "null",
#' k = 3,
#' caption = "Note: Iris dataset"
#' )
#'
#' # creating caption (for alternative)
#' bf_expr(
#' bf.df = bf.df,
#' output = "alternative"
#' )
#' bf_expr(bf.df, output = "alternative")
#' }
#' @export

Expand Down
8 changes: 4 additions & 4 deletions R/reexports.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ rlang::`%||%`
rlang::`%|%`

#' @export
#' @importFrom tibble tibble
tibble::tibble
#' @importFrom ipmisc tibble
ipmisc::tibble

#' @export
#' @importFrom tibble as_tibble
tibble::as_tibble
#' @importFrom ipmisc as_tibble
ipmisc::as_tibble

# ----------------------- metaBMA -------------------------------------

Expand Down
12 changes: 0 additions & 12 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,6 @@
},
"sameAs": "https://CRAN.R-project.org/package=rlang"
},
{
"@type": "SoftwareApplication",
"identifier": "tibble",
"name": "tibble",
"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=tibble"
},
{
"@type": "SoftwareApplication",
"identifier": "tidyr",
Expand Down
14 changes: 7 additions & 7 deletions docs/reference/bf_corr_test.html

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

7 changes: 2 additions & 5 deletions docs/reference/bf_expr.html

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

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

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

8 changes: 2 additions & 6 deletions docs/reference/reexports.html

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

7 changes: 4 additions & 3 deletions man/bf_corr_test.Rd

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

7 changes: 2 additions & 5 deletions man/bf_expr.Rd

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

6 changes: 4 additions & 2 deletions man/bf_extractor.Rd

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

4 changes: 1 addition & 3 deletions man/reexports.Rd

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

13 changes: 9 additions & 4 deletions tests/testthat/test-bf_expr.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ testthat::test_that(

# bayes factor results
set.seed(123)
bf_results <- tibble::tribble(
~log_e_bf01, ~bf.prior,
1.1, 0.88
)
bf_results <-
structure(
list(log_e_bf01 = 1.1, bf.prior = 0.88),
row.names = c(
NA,
-1L
),
class = c("tbl_df", "tbl", "data.frame")
)

# expected
using1 <- bf_expr(
Expand Down

0 comments on commit 79e5268

Please sign in to comment.