Skip to content

Commit

Permalink
brmdata: add deprecation warning
Browse files Browse the repository at this point in the history
This should have been done a long time ago...
  • Loading branch information
paul-buerkner committed Sep 16, 2016
1 parent 18333b3 commit f65a79d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions R/make_standata.R
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,10 @@ make_standata <- function(formula, data = NULL, family = "gaussian",
}

#' @export
brmdata <- function(formula, data = NULL, family = "gaussian",
autocor = NULL, partial = NULL,
cov_ranef = NULL, ...) {
# deprectated alias of make_standata
make_standata(formula = formula, data = data,
family = family, autocor = autocor,
partial = partial, cov_ranef = cov_ranef, ...)
brmdata <- function(...) {
# deprecated alias of make_standata
warning("Function 'brmdata' is deprecated. ",
"Please use 'make_standata' instead.",
call. = FALSE)
make_standata(...)
}
4 changes: 2 additions & 2 deletions tests/testthat/tests.make_standata.R
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ test_that("make_standata computes data for inverse.gaussian models", {

test_that("brmdata is backwards compatible", {
temp_data <- data.frame(y = 1:10, x = sample(1:5, 10, TRUE))
expect_identical(brmdata(y ~ x + (1|x), data = temp_data,
family = "poisson"),
expect_identical(SW(brmdata(y ~ x + (1|x), data = temp_data,
family = "poisson")),
make_standata(y ~ x + (1|x), data = temp_data,
family = "poisson"))
expect_identical(SW(brmdata(y ~ 1, data = temp_data,
Expand Down

0 comments on commit f65a79d

Please sign in to comment.