I am plotting survival functions with the survival package. Everything works fine, but how do I know which curve is which? And how can I add it to a legend?
url <- "http://socserv.mcmaster.ca/jfox/Books/Companion/data/Rossi.txt"
Rossi <- read.table(url, header=TRUE)[,c(1:10)]
km <- survfit(Surv(week, arrest)~race, data=Rossi)
plot(km, lty=c(1 ,2))