tests/testthat/test_coef.R

data(cats, package = "MASS")
l1 <- linmod(Hwt ~ Bwt * Sex, data = cats)
l2 <- lm(Hwt ~ Bwt * Sex, data = cats)

test_that("same estimated coefficients as lm function", {
  expect_equal(l1$coefficients, l2$coefficients)
})
harvard-P01/pkgtemplate documentation built on May 17, 2019, 3:04 p.m.