Description Usage Arguments Details Value Author(s) See Also Examples

This plot can be used to graphically display a correlation matrix by using the linewidth between the nodes in proportion to the correlation of two variables. It will place the elements homogenously around a circle and draw connecting lines between the points.

1 2 3 |

`m` |
a symmetric matrix of numeric values |

`col` |
the color for the connecting lines |

`lty` |
the line type for the connecting lines, the default will be |

`lwd` |
the line widths for the connecting lines. If left to |

`args.legend` |
list of additional arguments to be passed to the |

`pch` |
the plotting symbols appearing in the plot, as a non-negative numeric vector (see |

`pt.cex` |
expansion factor(s) for the points. |

`pt.col` |
the foreground color for the points, corresponding to its argument |

`pt.bg` |
the background color for the points, corresponding to its argument |

`las` |
alignment of the labels, 1 means horizontal, 2 radial and 3 vertical. |

`adj` |
adjustments for the labels. (Left: 0, Right: 1, Mid: 0.5) |

`dist` |
gives the distance of the labels from the outer circle. Default is 2. |

`cex.lab` |
the character extension for the labels. |

`...` |
dots are passed to plot. |

The function uses the lower triangular matrix of `m`

, so this is the order colors, linewidth etc. must be given, when the defaults are to be overrun.

A list of x and y coordinates, giving the coordinates of all the points drawn, useful for adding other elements to the plot.

Andri Signorell <[email protected]>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
m <- cor(d.pizza[, which(sapply(d.pizza, IsNumeric, na.rm=TRUE))[-c(1:2)]],
use="pairwise.complete.obs")
PlotWeb(m=m, col=c(hred, hblue), main="Pizza Correlation")
# let's describe only the significant corrs and start with a dataset
d.m <- d.pizza[, which(sapply(d.pizza, IsNumeric, na.rm=TRUE))[-c(1:2)]]
# get the correlation matrix
m <- cor(d.m, use="pairwise.complete.obs")
# let's get rid of all non significant correlations
ctest <- PairApply(d.m, function(x, y) cor.test(x, y)$p.value, symmetric=TRUE)
# ok, got all the p-values, now replace > 0.05 with NAs
m[ctest > 0.05] <- NA
# How does that look like now?
Format(m, na.form = ". ", leading="drop", digits=3, align = "right")
PlotWeb(m, las=2, cex=1.2)
# define line widths
PlotWeb(m, lwd=abs(m[lower.tri(m)] * 10))
``` |

DescTools documentation built on Dec. 11, 2017, 5:10 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.