Hi David thanks for the help, i was just looking back to say I have found my solution (i think) and as you suggested survfit was the way to go.
my solution was this: model<-survfit(Surv(a$longevity)~a$sex) plot(model,ylab="proportion alive",xlab="time (days)",col=c("red","blue")) -- View this message in context: http://r.789695.n4.nabble.com/Survival-Curves-tp4561685p4562010.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.