![]() ![]() Pct_Death = scales :: percent ( N_Death / N_Known, 0.1 ), # percent cases who died (to 1 decimal) N_Known = N_Death + N_Recover, # number with known outcome Names_from = outcome ) %>% # new column names are from outcomes mutate ( # Add new columns Values_from = c ( ct_value, N ), # new values are from ct and count columns N = n ( ), # Number of rows for whole datasetĬt_value = median ( ct_blood, na.rm = T ) ) ) %>% # Median CT for whole dataset # Pivot wider and format # mutate (hospital = replace_na ( hospital, "Total" ) ) %>% pivot_wider ( # Pivot from long to wide N = n ( ), # Number of rows per hospital-outcome groupĬt_value = median ( ct_blood, na.rm = T ) ) %>% # median CT value per group # add totals # bind_rows ( # Bind the previous table with this mini-table of totals linelist %>% filter ( ! is.na ( outcome ) & hospital != "Missing" ) %>% group_by ( outcome ) %>% # Grouped only by outcome, not by hospital summarise ( Table % # Get summary values per hospital-outcome group # group_by ( hospital, outcome ) %>% # Group data summarise ( # Create new summary columns of indicators of interest 46 Version control and collaboration with Git and Github.33 Demographic pyramids and Likert-scales.19 Univariate and multivariable regression. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |