I ran a correlation analysis between two vectors and I need to plot the -log10(pvalue)...when the correlation runs, I have the following results:
data <- read.table("test-data.txt")
a <- data[,1]
b <- data[,2]
test <- cor.test(a, b)
test
Pearson's product-moment correlation
data: a and b
t = 8.3704, df = 10352, p-value < 2.2e-16
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.06282908 0.10109436
sample estimates:
cor
0.08199194
but when I extract the p-value as test$p.value
it comes out as zero..this means that when I calculate the -log10(pv) i get Inf
as results...which I cannot plot.
however, -log(2.2e-16, base=10)
is 15.65758
which is what I want
so my question is: how would you maintain the exponential number?
also, this is a sample of a series of 81 correlations I'm running that have to be plotted all together, I have this very same problem for 30 out of 81