View source: R/pairwise_scores.R
pairwise_scores | R Documentation |
Calculates scores for every variable pair in a dataset when by
is NULL
. If by
is a name of a variable in the dataset, conditional scores for every
variable pair at different levels of the grouping variable are calculated.
pairwise_scores(
d,
by = NULL,
ungrouped = TRUE,
control = pair_control(),
handle.na = TRUE
)
d |
a dataframe |
by |
a character string for the name of the conditioning variable. Set to |
ungrouped |
Ignored if |
control |
a list for the measures to be calculated for different variable types. The default is
|
handle.na |
If TRUE uses pairwise complete observations to calculate measure of association. |
Returns a pairwise
tibble structure.
A tibble with class pairwise
.
irisc <- pairwise_scores(iris)
irisc <- pairwise_scores(iris, control=pair_control(nnargs= c(method="spearman")))
irisc <- pairwise_scores(iris, control=pair_control(fn="pair_ace"))
#Lots of numerical measures
irisc <- pairwise_scores(iris, control=pair_control(nn="pairwise_multi", fn=NULL))
irisc <- pairwise_scores(iris,
control=pair_control(nn="pairwise_multi", nnargs="pair_cor", fn=NULL))
#conditional measures
cond_iris <- pairwise_scores(iris, by = "Species")
cond_iris_wo <- pairwise_scores(iris, by = "Species",ungrouped=FALSE) # without overall
irisc <- pairwise_scores(iris, control=pair_control(nn="pairwise_multi", fn=NULL))
irisc <- pairwise_scores(iris, by = "Species",control=pair_control(nn="pairwise_multi", fn=NULL))
#scagnostics
sc <- pairwise_scores(iris, control=pair_control(nn="pair_scagnostics", fn=NULL)) # ignore fn pairs
sc <- pairwise_scores(iris, by = "Species",
control=pair_control(nn="pair_scagnostics", fn=NULL)) # ignore fn pairs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.