We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
tidy_select_variables()
include
Currently, the include parameter preserves the original order of the variables.
library(broom.helpers) mod <- lm(Sepal.Length ~ ., data = iris) mod |> tidy_plus_plus() |> dplyr::select(term, variable, label, estimate) #> # A tibble: 6 × 4 #> term variable label estimate #> <chr> <chr> <chr> <dbl> #> 1 Sepal.Width Sepal.Width Sepal.Width 0.496 #> 2 Petal.Length Petal.Length Petal.Length 0.829 #> 3 Petal.Width Petal.Width Petal.Width -0.315 #> 4 Speciessetosa Species setosa 0 #> 5 Speciesversicolor Species versicolor -0.724 #> 6 Speciesvirginica Species virginica -1.02 mod |> tidy_plus_plus(include = c(Species, Petal.Length)) |> dplyr::select(term, variable, label, estimate) #> # A tibble: 4 × 4 #> term variable label estimate #> <chr> <chr> <chr> <dbl> #> 1 Petal.Length Petal.Length Petal.Length 0.829 #> 2 Speciessetosa Species setosa 0 #> 3 Speciesversicolor Species versicolor -0.724 #> 4 Speciesvirginica Species virginica -1.02 mod |> tidy_plus_plus(include = c(Species, Petal.Length, everything())) |> dplyr::select(term, variable, label, estimate) #> # A tibble: 6 × 4 #> term variable label estimate #> <chr> <chr> <chr> <dbl> #> 1 Sepal.Width Sepal.Width Sepal.Width 0.496 #> 2 Petal.Length Petal.Length Petal.Length 0.829 #> 3 Petal.Width Petal.Width Petal.Width -0.315 #> 4 Speciessetosa Species setosa 0 #> 5 Speciesversicolor Species versicolor -0.724 #> 6 Speciesvirginica Species virginica -1.02
Created on 2022-10-07 with reprex v2.0.2
To be consistent with dplyr::select(), should the table be reordered according to the include parameters?
dplyr::select()
@ddsjoberg do you have an advice about it?
The text was updated successfully, but these errors were encountered:
Oh good point. I think it would be preferable to have the order adjusted with include= if it's not too hairy to make happen.
include=
Sorry, something went wrong.
I will explore it
NEWS upadte
9ec45d3
fix #183
It is finally not too complicated to do it. See #184
Successfully merging a pull request may close this issue.
Currently, the
include
parameter preserves the original order of the variables.Created on 2022-10-07 with reprex v2.0.2
To be consistent with
dplyr::select()
, should the table be reordered according to theinclude
parameters?@ddsjoberg do you have an advice about it?
The text was updated successfully, but these errors were encountered: