Skip to content

Commit

Permalink
Merge pull request #366 from DeclareDesign/cran-patch
Browse files Browse the repository at this point in the history
patch - CRAN errors
  • Loading branch information
graemeblair authored Nov 12, 2020
2 parents 9ca7645 + 5cb5786 commit ff35c64
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This package was submitted to CRAN on 2020-09-01.
Once it is accepted, delete this file and tag the release (commit c9eb598).
This package was submitted to CRAN on 2020-09-04.
Once it is accepted, delete this file and tag the release (commit 6405256).
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: estimatr
Type: Package
Title: Fast Estimators for Design-Based Inference
Version: 0.24.0
Version: 0.26.0
Authors@R: c(person("Graeme", "Blair", email = "[email protected]", role = c("aut", "cre")),
person("Jasper", "Cooper", email = "[email protected]", role = c("aut")),
person("Alexander", "Coppock", email = "[email protected]", role = c("aut")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# estimatr 0.26.0

* Test suite changes

# estimatr 0.24.0

* tidy: rename nobs, nclusters, nblocks
Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Submission

We sincerely apologize for the delay in sending this update. This small patch mostly contains bugfixes, but also removes a dependency on `clubSandwich.` We now suggest the package and skip the test unless it is installed. We have also fixed small bugs due to the most recent version of clubSandwich posted yesterday.
Thank you for accepting this patch, which addressses a change to the API for the modelsummry package pushed to CRAN on 9/4.
13 changes: 7 additions & 6 deletions tests/testthat/test-modelsummary.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ test_that("modelsummary works with glance", {
model2 <- lm_robust(mpg ~ am, mtcars, clusters = cyl)
model3 <- lm_lin(mpg ~ am, ~ cyl, mtcars)

mso <- modelsummary::extract(list(model1, model2, model3))
mso <- modelsummary::modelsummary(list(model1, model2, model3), output = "data.frame")

expect_equal(colnames(mso), c("group", "term", "statistic",
expect_equal(colnames(mso), c("group", "term", "statistic",
"Model 1", "Model 2", "Model 3"))

expect_equal(nrow(mso), 12L)
Expand All @@ -23,8 +23,9 @@ test_that("modelsummary works with glance", {
model1 <- iv_robust(mpg ~ am | gear, mtcars)
model2 <- iv_robust(mpg ~ am | gear, mtcars, clusters = cyl, diagnostics = TRUE)

mso <- modelsummary::extract(list(model1, model2),
gof_omit = c("N|[sS]tatistic|p.value|p{1}"))
mso <- modelsummary::modelsummary(list(model1, model2),
gof_omit = c("N|[sS]tatistic|p.value|p{1}"),
output = "data.frame")

expect_equal(nrow(mso), 6)

Expand All @@ -33,14 +34,14 @@ test_that("modelsummary works with glance", {
# difference_in_means
model1 <- difference_in_means(mpg ~ am, mtcars)
model2 <- difference_in_means(mpg ~ am, mtcars, blocks = vs)
mso <- modelsummary::extract(list(model1, model2))
mso <- modelsummary:::extract_models(list(model1, model2))


# horvitz_thompson
model1 <- horvitz_thompson(mpg ~ am, mtcars)
model2 <- horvitz_thompson(mpg ~ am, mtcars, blocks = vs)

mso <- modelsummary::extract(list(model1, model2))
mso <- modelsummary::modelsummary(list(model1, model2), output = "data.frame")

expect_equal(nrow(mso), 6)

Expand Down

0 comments on commit ff35c64

Please sign in to comment.