This document contains R code for analyzing survival data. It loads survival data from a file, fits Kaplan-Meier and Cox proportional hazards models, and generates Kaplan-Meier curves and log-rank test results. Functions are defined to plot single or multiple stratified Kaplan-Meier curves using ggplot. The curves and log-rank test are generated by fitting survival models to treatment groups in the loaded data and summarizing the results.