How to make R display very small p-values?
Hi all,
I am using a built-in function to calculate p-values for a set of genes. However, as an output, for some of the genes I am getting 0. I think its because the number is too small and R outputs it as 0. Any suggestions on how can I get over this? The line where p-value is calculated in function is
p = pchisq(df=df_brown, q=x/c, lower.tail=FALSE)
I came across "Rmpfr" package and then tried to implement it. But the resulting p-value is still 0.
p = mpfr(pchisq(df=df_brown, q=x/c, lower.tail=FALSE), 120)
Any leads would be highly appreciated. Thanks.
• 961 views
•
link
0 answers
No answers yet.
Log in to answer this question.
You can try increasing the number of significant digits after decimal point by running
options(digits=22). If the value is still 0, there is not much you can do about it.Your example is not reproducible. Please provide example data to mimic the output. Best would be tu type
dput(df_brown)and provide so one can copy/paste it, given the output given it is not too big.Hello Star!
We believe that this post does not fit the main topic of this site.
Lets keep the discussion focused here Why the p-value is 0, or how to keep the precision for small values?
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!