I am trying to use gtsummary::tbl_summary to create a table that allows me to use distinct values within variables. I have a dataframe where each row represents a patient visit meaning that an ID can be present more than once. Instead of having each ID count listed in the table, I want a count of the sum of unique IDs. Trying to stick with gtsummary since it provides nicely formatted values
library(gtsummary)
df <- data.frame(id = c("a", "b", "c", "a", "a", "c", "b"))
tbl_summary(df)
