Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 27, 2024
1 parent d308041 commit 3092f82
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/testthat/test-get_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -501,3 +501,14 @@ test_that("get_data works for fixest inside functions", {
c("Sepal.Length", "Sepal.Width", "Petal.Length", "Species")
)
})


test_that("get_data, division in I()", {
skip_if_not_installed("betareg")
data("FoodExpenditure", package = "betareg")
m2 <- betareg::betareg(I(food / income) ~ income + persons, data = FoodExpenditure)
expect_named(
get_data(m2, source = "mf"),
c("I(food/income)", "income", "persons", "food", "income.1")
)
})

0 comments on commit 3092f82

Please sign in to comment.