ggsurvplot:Error in parse(text = paste0("list(", paste(varnames, collapse = ","), : <text>:1:25: unexpected symbol


Hi, and welcome!

Your question can't be answered readily without a reproducible example, called a reprex. For one thing, ggsurvplot is in the survminer package, which requires some digging to discover. For another, the data are unknown, and the error is unidentified! There's not much to go on :grin:

Fortunately, in this case, the problem was easy to spot:

rnaID <-"`RP11-181G12.2`"
sprintf("Surv(days,event)~as.numeric(%s >median(%s))",rnaID,rnaID)
#> [1] "Surv(days,event)~as.numeric(`RP11-181G12.2` >median(`RP11-181G12.2`))"

Created on 2019-12-21 by the reprex package (v0.3.0)

Surv expects two numerics as an argument but surv is class character.