Skip to content

digit precision in p value of rcorr

2 messages · Jason Love, Rui Barradas

#
Hello,

You could post to R-Help, maybe it will of use to others. And since it's 
a follow-up I'll post it there.

To get more (or less) digits use the respective argument to print().

Var <-
structure(list(D.Prime = c(0.17234, 0.14399, 0.14626, 0.035147,
0.058957), T.statistics = c(4.9268, 2.892, 2.6428, 1.1124, 2.7237
)), .Names = c("D.Prime", "T.statistics"), class = "data.frame",
row.names = c("1", "2", "3", "4", "5"))


library(Hmisc)
rc <- rcorr(as.matrix(Var), type="pearson")

print(rc$P, digits = 10)

Hope this helps,

Rui Barradas

Em 12-09-2012 19:39, Jason Love escreveu: