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

Comments

Projects
None yet
2 participants
@MarcinKosinski
Copy link
Contributor

commented Apr 7, 2017

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

This comment has been minimized.

Copy link
Owner

commented Apr 7, 2017

Good suggestion!!

@kassambara

This comment has been minimized.

Copy link
Owner

commented Apr 7, 2017

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

This comment has been minimized.

Copy link
Owner

commented Apr 7, 2017

Should work now:

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Owner

commented Apr 7, 2017

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

Thanks:-)!

@MarcinKosinski

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2017

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

@kassambara

This comment has been minimized.

Copy link
Owner

commented Apr 16, 2017

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

@kassambara kassambara closed this Apr 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.