title: Legend on survival plot
body: <p>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?</p>
  
  <pre><code>require(survival)  # not loaded by default although installed by default
  group &lt;- age
  kmsurvival1 &lt;- survfit(Surv(as.numeric(time),event) ~ group)
  plot(kmsurvival1, xlab="Time",ylab="Survival Probability", mark.time = F)
  </code></pre>