Description Usage Arguments Value Author(s) Examples
The function calculates correlation coefficient, statistical significance level and filters according to conditions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
corr |
correlation matrix. |
p.value |
significant matrix of correlation. |
directed |
logical value, whether or not to create a directed graph. |
row.names, col.names |
row and column names of correlation matrix. |
rm.dup |
logical (defaults to TRUE) indicating whether remove duplicate rows. If TRUE, the correlation between A-B and B-A is retained only A-B. |
simplify |
logical value (defaults to TRUE) indicating whether to delete nodes without edge connections. |
weight |
NULL (default) or name of column in edges which will be renamed to "weight". |
r.thres |
a numeric value. |
r.abs |
logical value (defaults to TRUE). |
p.thres |
a numeric value. |
val.type |
type return value:
|
x |
a cor_network object. |
n |
number of rows to show. |
... |
extra params for printing. |
a tbl_graph (default), igraph or list of nodes and edges.
Houyun Huang, Lei Zhou, Jian Chen, Taiyun Wei
1 2 3 4 5 6 7 8 9 | cor_network(cor(mtcars))
corr <- correlate(mtcars, cor.test = TRUE)
cor_network(corr$r, corr$p.value)
## return a igraph object
cor_network(corr$r, corr$p.value, val.type = "igraph")
## reurn a tbl_graph object
cor_network(corr$r, corr$p.value, val.type = "tbl_graph")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.