I am using the predictSurvProb function in the pec package in R to predict the survival probability based on an fitted Coxph model as mentioned in
predictSurvProb
pec