benjaminrich / table1

79 stars 26 forks source link

Median and IQR #126

Open giuseppetrimarchi opened 6 months ago

giuseppetrimarchi commented 6 months ago

Dear Benjamin Rich,

congratulations on the package "table1" you structured. Allow me to suggest a modification to the "table1" function which summarizes the continuous variables using the mean (SD) and the median [Min, Max]. Wouldn't it be more appropriate, in consideration of the international publications in important journals, to replace the minimum and maximum values after the median with the Interquartile range (IQR)? For example: Median [Q1 – Q3], where Q1 is the first quartile or 25th percentile and Q3 is the third quartile or 75th percentile. Many international magazines impose these two values or just the IQR value after the median. Thank you for your interest

benjaminrich commented 5 months ago

Even if it's not the default (which I don't really want to change at this point), you have the option of doing this by using render.continuous=c("Mean (SD)", "Median [Q1 – Q3]"). The problem with defaults is that you can't make everyone happy (same goes for rounding). This might be your preferred default, but for someone else it might be something different, so the best I can do is try to give flexibility and make it easy to change what is rendered. Maybe we could introduce an option that would change the defaults globally for each user, that is something to think about.

giuseppetrimarchi commented 5 months ago

Thank you so much for your help!