0

I am using ggsurvplot to create a kaplan-meier curve. I get the following warning message "Warning messages: 1: Removed 1 rows containing missing values (geom_text)." I have seen other posts that are similar and have solved the problem when the image is geom_point.

But the proposed solution [Explain ggplot2 warning: "Removed k rows containing missing values" of adding coord_cartesian does not work with ggsurvplot. I know that I can simply expand my y-axis to remove this warning message but i dont want to do that because then you are unable to differentiate when the curves separate.

My code: ggsurvplot(survival.primary, ylim=c(0.0,0.20), xlim=c(0,1500), break.x.by=180, censor = F, risk.table = T, fun = "event")

Thank you very much!

  • 1
    Note that we have neither your data nor your output, so we can't see what you're seeing, and we can't run anything for ourselves. [See here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on making a reproducible example – camille Nov 07 '19 at 15:53
  • Hi Camille. Sorry, I am not able to upload the data since it's not publicly available. Also I'm new to stack overflow, so still learning the ropes. Most importantly, I realized that by removing "ylim" statement, the problem is fixed!! – figueroa Nov 07 '19 at 17:09
  • 1
    If you click the link I posted, you'll see several methods for including example data that doesn't have to be your actual data but that will make the question reproducible – camille Nov 07 '19 at 17:16

0 Answers0