View source: R/new_pairwise_data.R
| new_pairwise_data | R Documentation |
Constructs a structured spec object consumed by pairwise_matrix(). Always
requires var1 and var2 — the pair pattern they encode determines which
triangle(s) of the matrix are filled:
new_pairwise_data(var1, var2, ...)
new_corr_data(var1, var2, ...)
var1 |
Character vector of first variable names per pair. |
var2 |
Character vector of second variable names per pair. |
... |
Named character vectors of equal length to |
| Pattern | Fills |
var1 < var2 | Lower triangle only |
var1 <= var2 | Lower triangle + diagonal |
var1 > var2 | Upper triangle only |
var1 >= var2 | Upper triangle + diagonal |
var1 != var2 | Both triangles, no diagonal |
var1 == var2 | Full matrix (diag forced to 1) |
All additional named vectors become display rows inside each cell, rendered in the order they are supplied.
An object of class pairwise_spec.
new_pairwise_data(
var1 = c("a", "a", "b"),
var2 = c("b", "c", "c"),
rho = c("0.89", "0.79", "0.66"),
pval = c("<0.001", "<0.001", "<0.001")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.