Closed MarcinKosinski closed 8 years ago
I'll figure it out how to fix this error in survminer. Meanwhile, I'd suggest using do.call() in kmTCGA function as follow:
fit <- do.call(survival::survfit, list(formula = formu, data = data))
Please, let me know if it works...
Best Regards, A. Kassambara
Thanks. I'll Have a look at this :)
Marcin Kosinski
Dnia 17.02.2016 o godz. 20:23 Alboukadel KASSAMBARA notifications@github.com napisał(a):
I'll figure it out how to fix this error in survminer. Meanwhile, I'd suggest using do.call() in kmTCGA function as follow:
fit <- do.call(survival::survfit, list(formula = formu, data = data)) Please, let me know if it works...
Best Regards, A. Kassambara
— Reply to this email directly or view it on GitHub.
This did solve the issue! Thanks for PR https://github.com/RTCGA/RTCGA/pull/48
I have seen that you are using risky parameter
eval
with defaultenvironment = parent.frame()
https://github.com/kassambara/survminer/blob/master/R/ggsurvplot.R#L470I am developing an
[RTCGA](https://github/RTCGA/RTCGA)
package for simple access to TCGA data with as simple plot functions as possible, since the target group are mainly biologists. I have appreacieatedsurvminer
as a alternative forsurvMisc
and I am really glad, that my suggestions help upgradingsurvminer
which result in better functionalities inRTCGA
package.I have wrote a wprapper for
ggsurvplot
inkmTCGA
function : https://github.com/RTCGA/RTCGA/blob/master/R/kmTCGA.R#L53-L87 where I preparesurvfit
from names of parameters. This is comfortable for biologist because they don't need to bother about learningformula
R specifications.I have occured such an error with this function which brakes when I pass
pval = TRUE
So I understand from that error is:
kmTCGA passes fit in character mode to ggsurvplot, which uses
.get_pvalue
thateval
the formula call in the environment of.get_pvalue
where the variabletimes
passed tokmTCGA
is not seen, sinceeval
uses default environmentparent.frame()
.I have no proposition for workaround for this. Do you know any function as
match_all_parent_frames_levels
? orget_anywhere
/getAnywhere()
? If you have any suggestion you could fixsurvminer
or provide a PR forRTCGA
. I would really appreciate that. I think from this team work both packages may benefit.