corrr icon indicating copy to clipboard operation
corrr copied to clipboard

Focus on one variable in a network_plot

Open joaomaroco opened this issue 2 years ago • 0 comments

Hi there, Thanks for the great network_plot function.

I wonder if we can just focus on a single variable in the correlation matrix.

For example:

res.cor <- correlate(pmeans[,-c(1:2)])|> focus(BELONG)
network_plot(res.cor, min_cor = 0.5, colors = c("red", "green"))

produces: image

But I would just like to represent the correlations with "BELONG" (bottom left) the others could be grayed out, or just removed. Also the thickness of the lines could also be proportional to the absolute value of the correlations, and the colors would represent the signal.

Thanks!

joaomaroco avatar Feb 07 '24 16:02 joaomaroco