Learn R Programming

qreport (version 0.1.0)

vClus: cClus

Description

Make Variable Clustering Quarto Report Section

Usage

vClus(
  d,
  exclude = NULL,
  corrmatrix = FALSE,
  fracmiss = 0.2,
  maxlevels = 10,
  minprev = 0.05,
  horiz = FALSE,
  label = "fig-varclus",
  print = TRUE
)

Value

nothing; makes Quarto tabs

Arguments

d

a data frame or table

exclude

formula or vector of character strings containing variables to exclude from analysis

corrmatrix

set to TRUE to use Hmisc::plotCorrM() to depict a Spearman rank correlation matrix.

fracmiss

if the fraction of NAs for a variable exceeds this the variable will not be included

maxlevels

if the maximum number of distinct values for a categorical variable exceeds this, the variable will be dropped

minprev

the minimum proportion of non-missing observations in a category for a binary variable to be retained, and the minimum relative frequency of a category before it will be combined with other small categories

horiz

set to TRUE to draw the dendrogram horizontally

label

figure label for Quarto

print

set to FALSE to not let dataframeReduce report details

Author

Frank Harrell

Details

Draws a variable clustering dendrogram and optionally graphically depicts a correlation matrix. See this for an example. Uses Hmisc::varclus().

See Also

Examples

Run this code
if (FALSE) {
vClus(mydata, exclude=.q(country, city))
}

Run the code above in your browser using DataLab