Skip to content

Commit

Permalink
oh snap
Browse files Browse the repository at this point in the history
  • Loading branch information
ddsjoberg committed Oct 4, 2024
1 parent d1ecdd8 commit 6ee0e89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions tests/testthat/_snaps/ard_attributes.survey.design.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

Code
attr(dclus1$variables$sname, "label") <- "School Name"
as.data.frame(ard_attributes(dclus1, variables = c(sname, dname), label = list(
dname = "District Name")))
as.data.frame(ard_attributes(dclus1, variables = c(sname, dname), label = list(dname = "District Name")))
Output
variable context stat_name stat_label stat
1 sname attributes label Variable Label School Name
2 sname attributes class Variable Class character
3 dname attributes label Variable Label District Name
4 dname attributes class Variable Class character
variable context stat_name stat_label stat fmt_fn warning error
1 sname attributes label Variable Label School Name .Primitive("as.character") NULL NULL
2 sname attributes class Variable Class character NULL NULL NULL
3 dname attributes label Variable Label District Name .Primitive("as.character") NULL NULL
4 dname attributes class Variable Class character NULL NULL NULL

2 changes: 1 addition & 1 deletion tests/testthat/test-ard_attributes.survey.design.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
skip_if_not(is_pkg_installed(c("survey", "withr"), reference_pkg = "cardx"))

test_that("ard_attributes.survey.design() works", {
withr::local_options(list(width = 90))
withr::local_options(list(width = 120))
data(api, package = "survey")
dclus1 <- survey::svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc)

Expand Down

0 comments on commit 6ee0e89

Please sign in to comment.