Relative Content

Tag Archive for rplotsurvminer

ggsurvplot Interprets Number of Observations as Levels in newdata Argument

I am experiencing an issue with the ggsurvplot function from the survminer package in R. When attempting to plot survival curves using ggsurvplot with the newdata argument, the function incorrectly interprets the number of observations as the number of levels, resulting in an error. Without the newdata argument, the function does not recognize the levels of the factor variable correctly, leading to another error.