Tables can be knitted to PDF, Word or html documents. # Table 2 - 5 yr mortality -Įxplanatory = c("age", "age.factor", "sex.factor", Summary_factorlist() is also commonly used to summarise any number of variables by an outcome variable (say dead yes/no). row proportions, include a total column etc. median for continuous variables, column vs. See other options relating to inclusion of missing data, mean vs. Summary_factorlist(dependent, explanatory, p=TRUE, add_dependent_label=TRUE) # Table 1 - Patient demographics by variable of interest -Įxplanatory = c("age", "age.factor", "sex.factor", "obstruct.factor")ĭependent = "perfor.factor" # Bowel perforation # Load example dataset, modified version of survival::colon When categorical, the variable of interest can have a maximum of five levels. This is often “Table 1” of a published study. Summary_factorlist() is a wrapper used to aggregate any number of explanatory variables by a single variable of interest. Summarise variables/factors by a categorical variable To install off-line (or in a Safe Haven), download the zip file and use devtools::install_local(). If needed, they can be installed in the normal way: install.packages("rstan") These have been left as Suggests rather than Depends to avoid unnecessary installation. Some of the functions require rstan and boot. It is recommended that this package is used together with dplyr, which is a dependent. You can install finalfit from github with: # install.packages("devtools")ĭevtools::install_github("ewenharrison/finalfit") ![]() Its design follows Hadley Wickham’s tidy tool manifesto. ![]() When combined with RMarkdown, the reporting becomes entirely automated. It is particularly useful when undertaking a large study involving multiple different regression analyses. I spent many years repeatedly manually copying results from R analyses and built these functions to automate our standard healthcare data workflow. The finafit package brings together the day-to-day functions we use to generate final results tables and plots when modelling.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |