You can use the package to estimate KM parameters and survival probability
like this R code:
library(survival)
kmfit <- survfit(Surv(days, status == 1), data = x)
summary(kmfit)
plot(kmfit)
if you want to campare difference of two data
than add ~variable after Surv(days, status == 1)
like this(ex: sex)
kmfit <- survfit(Surv(days, status == 1)~sex, data = x)
hope those code helpful to you
Thanks!!