You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a typical project, I need a Table 1 describing the patient population where I'll report, for example, the median IQR for age. Currently, the inline_text.tbl_summary() function can only print exactly what appears in the table, e.g. 4.5 (3.0, 6.7). But I often want to print just the median, or for categorical I"ll only want to print n or the percent.
I would like to introduce a pattern argument where we can grab any statistic from the table. This will require a large update to tbl_summary(). One possible solution is to return a column in the meta_data tibble that is a tibble containing the individual statistics.
Here's an example of the meta_data table and a print of the last column containing the statistics. (Perhaps in the update process we add in the ability to not only round to integer values, but use a rounding function?)
# A tibble: 2 x 6variableclasssummary_typevar_labelstat_displaydf_stats<chr><chr><chr><chr><chr><list>1agenumericcontinuousAge, yrs {median} ({p25}, {~<tibble [1x~2gradefactorcategoricalGrade {n} ({p}%) <tibble [3x~
[[1]]
# A tibble: 1 x 3medianp25p75<dbl><dbl><dbl>146.337.256.8
[[2]]
# A tibble: 3 x 3nNp<dbl><dbl><dbl>1672000.3352582000.2903752000.375
For a typical project, I need a Table 1 describing the patient population where I'll report, for example, the median IQR for age. Currently, the
inline_text.tbl_summary()
function can only print exactly what appears in the table, e.g.4.5 (3.0, 6.7)
. But I often want to print just the median, or for categorical I"ll only want to printn
or thepercent
.I would like to introduce a pattern argument where we can grab any statistic from the table. This will require a large update to
tbl_summary()
. One possible solution is to return a column in the meta_data tibble that is a tibble containing the individual statistics.Here's an example of the meta_data table and a print of the last column containing the statistics. (Perhaps in the update process we add in the ability to not only round to integer values, but use a rounding function?)
Created on 2019-10-20 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: