I had the need to create a correlation table, but with corrected p-values (given alpha-inflation). I hence changed the correlation function to use the psych (rather than stats) package. At the same time, I introduced some flexibility by allowing to choose whether to show leading zeros for both p-values and correlation measures (which in psychology should not have a leading zero as values can only be -1..1).
I had the need to create a correlation table, but with corrected p-values (given alpha-inflation). I hence changed the correlation function to use the psych (rather than stats) package. At the same time, I introduced some flexibility by allowing to choose whether to show leading zeros for both p-values and correlation measures (which in psychology should not have a leading zero as values can only be -1..1).