
Dendrogram of the variables, with the best sets below it
Source:R/variables_output.R
plot_variable_tree.RdThe union tree of select_variables(): complete linkage on 1 - the largest
|Spearman rho| over all data sets, so variables joined below the dashed
line (|rho| >= thr_r) are collinear in at least one data set; these
clusters are shaded alternately. Below the tree, each row is one variable
set and the dots mark its variables: a passing set takes at most one
variable from each cluster. By default the rows are the best-ranked sets
of each size (largest size first), labelled with their size and rank,
and the variables of the first row are printed in bold.
Usage
plot_variable_tree(
x,
set = NULL,
n_sets = 2,
base_size = 11,
file = NULL,
width = 2550,
height = 1950
)Arguments
- x
A
var_selection.- set
Sets to show as rows:
NULL(default) = then_setsbest-ranked sets of each size; one set as a character vector of variable names; or several sets, each one string with names separated by spaces (as inbest_sets()), optionally named to label the rows.- n_sets
Number of best sets per size shown when
setisNULL(at most 10 rows in total).- base_size
Base font size.
- file
Optional file(s) to save the plot to, e.g.
"fig.pdf"orc("fig.png", "fig.pdf"); the format follows the extension, and a name without extension is saved as PNG and PDF. The plot is also returned.- width, height
Size of the saved figure in pixels (PDF and SVG at 300 pixels per inch).