sym2long | R Documentation |
Convert a symmetric table(short format) to long format
sym2long(x, tri = c("upper", "lower"))
x |
a symmetric matrix-like data set. |
tri |
triangular being used. |
a data frame of pair-wise comparison.
co <- cor_tab(mtcars, cor.method = "spearman", adj.method = "BH")
names(co)
corr <- sym2long(co$r, tri = "upper")
pval <- sym2long(t(co$p), tri = "upper")
padj <- sym2long(co$p, tri = "upper")
tmp <- data.frame(corr, pval, padj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.