-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add missing select helpers #376
Conversation
@IndrajeetPatil @strengejacke do you agree on this? |
Sounds reasonable to me, but we will need to do this in a backward-compatible manner. We can add deprecation message for now, and remove the older version in a future release. |
It's a decision between "accepts only data frames" and "belongs to the center and standardize family". You could argue therefore to keep this name. |
Whether we rename it or not, introducing select helpers in library(datawizard)
dat <- data.frame(
a = c(1, 2, 3, 4),
x = c(4, 3, 3, 4),
y = c(1, 2, 1, 2),
ID = c(1, 2, 3, 1)
)
demean(dat, select = c("a", "x*y"), group = "ID")
#> a_between x_y_between a_within x_y_within
#> 1 2.5 6 -1.5 -2
#> 2 2.0 6 0.0 0
#> 3 3.0 3 0.0 0
#> 4 2.5 6 1.5 2 |
I think we can just leave |
This reverts commit b0b3d9f.
Ok, |
Close #133
Still need to do
demean()
but I think it should be renameddata_demean()
since it only accepts dataframes