vClus {qreport} | R Documentation |
cClus
Description
Make Variable Clustering Quarto Report Section
Usage
vClus(
d,
exclude = NULL,
corrmatrix = FALSE,
redundancy = FALSE,
spc = FALSE,
trans = FALSE,
rexclude = NULL,
fracmiss = 0.2,
maxlevels = 10,
minprev = 0.05,
imputed = NULL,
horiz = FALSE,
label = "fig-varclus",
print = TRUE,
redunargs = NULL,
spcargs = NULL,
transaceargs = NULL,
transacefile = NULL,
spcfile = NULL
)
Arguments
d |
a data frame or table |
exclude |
formula or vector of character strings containing variables to exclude from analysis |
corrmatrix |
set to |
redundancy |
set to |
spc |
set to |
trans |
set to |
rexclude |
extra variables to exclude from |
fracmiss |
if the fraction of |
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 |
imputed |
an object created by |
horiz |
set to |
label |
figure label for Quarto |
print |
set to |
redunargs |
a |
spcargs |
a |
transaceargs |
a |
transacefile |
similar to |
spcfile |
a character string specifying an |
Details
Draws a variable clustering dendrogram and optionally graphically depicts a correlation matrix. See this for an example. Uses Hmisc::varclus()
.
Value
makes Quarto tabs and prints output, returning nothing unless spc=TRUE
or trans=TRUE
are used, in which case a list with components princmp
and/or transace
is returned and these components can be passed to special print
and plot
methods for spc
or to ggplot_transace
. The user can put scree plots and PC loading plots in separate code chunks that use different figure sizes that way.
Author(s)
Frank Harrell
See Also
Hmisc::varclus()
, Hmisc::plotCorrM()
, Hmisc::dataframeReduce()
, Hmisc::redun()
, Hmisc::princmp()
, Hmisc::transace()
Examples
## Not run:
vClus(mydata, exclude=.q(country, city))
## End(Not run)