Comments (3)
I love this. For now, these functions have only worked with tbl_summary()
, and I have wanted to generalize them for tbl_regression()
. We should implement something like this! Just need to decide on the best route!
The possible types would be continuous, categorical, dichotomous, interaction, and unknown (for when there is no model.frame()
method)? We should probably implement selectors for all types (well, except known)?
all_continuous()
all_categorical(dichotomous = TRUE)
all_dichotomous()
all_interaction()
I can implement the same in gtsummary, but I am not sure I'll be able to merely reexport the broom.helper functions if I want them to work with all the gtsummary obejcts. For example, we also have a summary type called continuous2
that has it's own selector. There is likely a pretty straightforward way around the issue...just need to sit with it longer and think :)
from broom.helpers.
Sure, we should think properly how to implement it.
If I understood properly, your trick in broom::.tidy_tidyselect()
, you recreate a tibble (df_empty
) with the list of variables to be able to apply dplyr::select()
.
I guess you use something similar in gt_summary
.
Maybe a possible trick could be to add a "var_type" attribute to each column of df_empty
. Then, to create functions as is_continous()
, is_categorical()
who test the value of the attribute, and finaly to code all_categorical()
as a where(is_categorical)
?
Just brainstorming...
Just some clarifications: what is exactly the type continuous2
?
Regards
from broom.helpers.
continuous2
variables are those that are summarized on 2 or more rows in tbl_summary()
and tbl_svysummary()
.
trial %>%
select(age, trt) %>%
tbl_summary(
by = trt,
type = all_continuous() ~ "continuous2",
statistic = all_continuous() ~ c("{N_nonmiss}",
"{mean} ({sd})",
"{median} ({p25}, {p75})"),
missing = "no"
)
from broom.helpers.
Related Issues (20)
- Support for mmrm models HOT 8
- Support for MASS::contr.sdif() contrasts
- Support for zero-inflated models
- beta regression is not supported yet HOT 2
- Considering a `tidy_post_fun` argument to `tidy_plus_plus()` HOT 2
- Support with coxphf model HOT 9
- Bug fixes and improvements for mixed models HOT 1
- tbl_regression (package gtsummary) and ggcoef_model (package ggstats) not working on the output of a replicate svyglm model HOT 2
- fantastic support of multivariate quantile regression for any quantile HOT 1
- Support for survival::cch model? HOT 5
- Avg_comparisons and nlme::lme() models HOT 1
- order of variable levels with marginal tidiers HOT 8
- Release broom.helpers 1.15.0
- Take into account (id) when computing model_get_n() for coxph models
- `marginaleffects::datagridcf()` is deprecated
- Do you know the status of the {margins} pkg? HOT 3
- Explore better support of VGAM::vglm() models HOT 1
- Execution time HOT 4
- marginaleffects::datagridcf() is deprecated
- pkgdown site has no search facility HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from broom.helpers.