I am working on the cox regression and survival library in R.

I want to see labels for factor variables in the cox regression output and I can’ t see the labels.

I run this code:

sex<-factor(sex,levels=c(1,2),

labels=c(“man”,“women”))

fit<-coxph(Surv(Time,status)~factor(group)+factor(sex)+age+factor(Diabet), mydata)

What code should I write in R to see label variables?

Thank you