Skip to content
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

custom p-value on the ggsurvplot #189

Closed
MarcinKosinski opened this issue Apr 7, 2017 · 7 comments
Closed

custom p-value on the ggsurvplot #189

MarcinKosinski opened this issue Apr 7, 2017 · 7 comments

Comments

@MarcinKosinski
Copy link
Contributor

One can specify pval = TRUE/FALSE in the ggsurvplot as a logical value.
Let also make this possible to be specified as a numeric value, that will be passed to the plot, so that user ca n pass any p-value to the final plot of the test that he needs (e.g. log-rank test as in #188 )

@kassambara
Copy link
Owner

Good suggestion!!

@kassambara
Copy link
Owner

I can activate this option in a minute...

kassambara added a commit that referenced this issue Apr 7, 2017
kassambara added a commit that referenced this issue Apr 7, 2017
@kassambara
Copy link
Owner

Should work now:

require("survival")
require("survminer")
fit<- survfit(Surv(time, status) ~ sex, data = lung)
ggsurvplot(fit, data = lung, pval = 0.1)

@MarcinKosinski
Copy link
Contributor Author

MarcinKosinski commented Apr 7, 2017

OMG : P I've been working for last 30 minutes on that : D ok nevermind.
What do you think about passing pval as a string also?

ggsurvplot(fit, data = lung, pval = TRUE)
ggsurvplot(fit, data = lung, pval = 0.03)
ggsurvplot(fit, data = lung, pval = "The hot p-value is: 0.031")
```

@kassambara
Copy link
Owner

Oh sorry... A good idea for pval = character... Wainting your pull request ...

Thanks:-)!

@MarcinKosinski
Copy link
Contributor Author

PR is here - #193
This issue can be closed.

@kassambara
Copy link
Owner

Thanks @MarcinKosinski! I tested and it works like charm:-)

kassambara added a commit that referenced this issue Apr 16, 2017
kassambara added a commit that referenced this issue Apr 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants