From 3092f82b446fb0f13e94c76512389bc02bd4dc88 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 27 Oct 2024 17:22:55 +0100 Subject: [PATCH] add test --- tests/testthat/test-get_data.R | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/testthat/test-get_data.R b/tests/testthat/test-get_data.R index 4ee3b9bc7..56a731c81 100644 --- a/tests/testthat/test-get_data.R +++ b/tests/testthat/test-get_data.R @@ -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") + ) +})