-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Special characters cannot be used for levels names of a categorical variable #91
Comments
Hi @dnzmarcio, To extract variable names used in This has been now fixed by applying Thank you for pointing this out. Best regards, |
Thank you. |
Expected behavior
Drawing survival curves for any categorical variable.
Actual behavior
If the categorical variable has levels with characters '>', '<=' then survival curves are not drawn.
Steps to reproduce the problem
library(survival)
library(survminer)
data(lung)
age.c <- ifelse(lung$age < 50, "<= 50", "> 50")
lung2 <- data.frame(lung, age.c)
fit <- survfit(Surv(time, status) ~ age.c, data = lung2)
ggsurvplot(fit)
session_info()
The text was updated successfully, but these errors were encountered: