I need help on how to write R code using gtsummary package to create a summary table with several categorical variables as rows and the column side (the "by" variable) is a numeric variable in my case, age in years. So in essence I would like to summarize several patient categorical characteristics by their mean/median age.
As an example, in this package, with the data "trial", I would like for instance to have on the row axis of the table the categorical variables (marker, stage, grade) while the by variable is "age", so median age for each category of those variables.
Thank you for help. Nelly