Hi I am totally new to R. This is my first attempt at it. I am producing a survival plot broken down by age. I can't figure out how to specify colours for each age line and put it in a legend. Can anyone help?
require(survival) # not loaded by default although installed by default
group <- age
kmsurvival1 <- survfit(Surv(as.numeric(time),event) ~ group)
plot(kmsurvival1, xlab="Time",ylab="Survival Probability", mark.time = F)