Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

degroup() for cross-classified data #521

Merged
merged 24 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: datawizard
Title: Easy Data Wrangling and Statistical Transformations
Version: 0.11.0.4
Version: 0.11.0.5
Authors@R: c(
person("Indrajeet", "Patil", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0003-1995-6531", Twitter = "@patilindrajeets")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ CHANGES
frame, where the first column contains name of the variable for which
frequencies were calculated, and the second column contains the frequency table.

* `demean()` (and `degroup()`) now also work for cross-classified designs, or
more generally, for data with multiple grouping or cluster variables (i.e.
`by` can now specify more than one variable).

# datawizard 0.11.0

BREAKING CHANGES
Expand Down
359 changes: 203 additions & 156 deletions R/demean.R

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ CMD
Carle
Catran
Crosstables
Dhaliwal
Disaggregating
DOI
De
Dom
Expand All @@ -16,6 +18,7 @@ GLMM
Gelman
Giesecke
Giesselmann
Guo
Heisig
Herrington
Hoffmann
Expand Down Expand Up @@ -79,6 +82,7 @@ midhinge
modelbased
modelling
nd
panelr
partialization
patilindrajeets
platykurtic
Expand Down
178 changes: 108 additions & 70 deletions man/demean.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions tests/testthat/test-center.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ test_that("center, factors (grouped data)", {
poorman::ungroup() %>%
poorman::pull(Species)

manual <- iris %>%
poorman::pull(Species)
manual <- poorman::pull(iris, Species)

expect_identical(datawizard, manual)
})
Expand Down
Loading
Loading