Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[BUG] Error when `ggsurvplot` is used inside function. #125
Comments
|
One possible (and very simple solution) is to add parameter data which should be used only inside other functions. I will think about better solutions, but for now nothing comes to my mind;) |
|
Using the function For example: library(survminer)
require("survival")
tmp <- function(dt)
{
lung2 <- dt
fit <- do.call(survfit,
list(formula = Surv(time, status) ~ sex, data = lung2))
ggsurvplot(fit)
}
tmp(lung) |
|
I think this is related to survift itselft, and not to the ggsurvplot. |
|
I think we might create a FAQ because issues became repeatable :) |
|
Absolutely for the FAQ!! |
I agree. The survfit function's formula construction seems not quite conventional. |
Expected behavior
ggsurvplotshould be able to be used inside other functions.Actual behavior
Error is thrown when
ggsurvplotis used inside function.Steps to reproduce the problem
session_info()