0

I'm using cpairs(data) to show possible relationships among the six variables in a bird size and the breeding site arrival date (day, Right tarsus, Right wing, Tail length, Bill length, Bill depth)

my.abs = abs(cor(data))
  my.colors = dmat.color(my.abs)
  my.ordered = order.single(cor(data))
  cpairs(data,my.ordered,panel.colors = my.colors, gap=0.5)

I know the high correlations are shown in pink, the middle are in blue, and the weaker are in yellow, but I don't know what high, middle or weak actually means in terms of P value.

I would like to put a legend box with the P values related to each color It is possible?

Greg
  • 3,570
  • 5
  • 18
  • 31
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Where does the `cpairs` function come from? – MrFlick Aug 07 '20 at 01:36

1 Answers1

0

cpairs() doesn't have that functionality to provide the labels for the corelation matrix. I would suggest you to use GGally library. In that library you will find, ggcorr() function. In that function put the label=True, to visualize the corelation value. Find more info on this blog: https://www.datacamp.com/community/blog/r-correlation-tutorial

sharmajee499
  • 116
  • 5