Skip to content

Commit

Permalink
Small bug change in rm_banova_mf with subj argument
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelosPsy committed May 11, 2020
1 parent 4f86575 commit 2549a50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
5 changes: 2 additions & 3 deletions R/rm_banova_mf.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@
#' cs1 <- paste0("CSP", 1:2)
#' cs2 <- paste0("CSM", 1:2)
#' subj <- "id"
#' group <- "group"
#'
#' # Repeated measures ANOVA
#' rm_banova_mf(cs1 = cs1, cs2 = cs2, subj = subj, data = example_data, time = TRUE)
#' rm_banova_mf(cs1 = cs1, cs2 = cs2, subj = subj, data = example_data, time = TRUE, multicore = FALSE)
#'
#' @export
rm_banova_mf <- function(cs1,
Expand Down Expand Up @@ -101,7 +100,7 @@ rm_banova_mf <- function(cs1,
suppressMessages(BayesFactor::anovaBF(
formula = eval(parse(text = anova_terms)),
data = data,
whichRandom = subj,
whichRandom = "subj",
progress = FALSE,
multicore = multicore
))
Expand Down
14 changes: 7 additions & 7 deletions tests/testthat/test.output.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ test_that("rm_anova_mf works", {
})

# This one takes a lot of time.
#test_that("rm_banova_mf works", {
# expect_known_output(rm_banova_mf(cs1, cs2, subj = subj, data = bf_data), tmp)
#})
test_that("rm_banova_mf works", {
expect_known_output(rm_banova_mf(cs1, cs2, subj = subj, data = example_data, multicore = FALSE), tmp)
})

# This one takes a lot of time.
#test_that("rm_banova_mf for groups works", {
# expect_known_output(rm_banova_mf(cs1, cs2, subj = subj, group = group, data = bf_data, multicore = TRUE), tmp)
#})
test_that("rm_banova_mf for groups works", {
expect_known_output(rm_banova_mf(cs1, cs2, subj = subj, group = group, data = example_data, multicore = FALSE), tmp)
})

test_that("universe works", {
expect_known_output(universe_cs(cs1, cs2, subj = subj, data = bf_data, include_bayes = FALSE), tmp)
expect_known_output(universe_cs(cs1, cs2, subj = subj, data = example_data, include_bayes = FALSE), tmp)
})

test_that("lm works", {
Expand Down

0 comments on commit 2549a50

Please sign in to comment.