I have a data.frame, df, with n variables in it. The variables can take any name.
I want to be able to fit coxph(Surv(time_to_event,bad_outcome)~var1+var2+...+varn,data=df)
But df is a variable, its length can change. How do I write a piece of code that can fit all the variables in df regardless of the number of variables in df and the names of the variables?
Thank you so much.