I have a dataset that looks something like this. and I am using a modelsummary
function to summarise some of its characteristics.
set.seed(1)
df<- data.frame(var1=runif(1000),
var2=runif(1000),
var3=runif(1000),
tr=rbinom(100, size=1, p=0.1)) %>%
arrange(desc(tr))
datasummary_balance(~tr,
fmt=3,
data=df,
output = "markdown")
I would like to rename var1 and display "This is my first variable", and also rename the headers, replacing "1" with "Treatment" and "0" with "control"
Does anyone knows how I can do this?
Maybe it is not relevant, but please consider that my final output should be in Latex
thanks