If R does not recognize a categorical feature (input from user) as factor, converts to factor.
prepare_feats(dat, disp_feats, feat_types, clust_feats, trans_type)
Dataframe with samples from original dataset ordered according to the clustering within each leaf node.
Character vector specifying features to be displayed.
Named vector indicating the type of each features, e.g., c(sex = 'factor', age = 'numeric'). If feature types are not supplied, infer from column type.
Logical. If TRUE, performs cluster on the features.
Character string of 'normalize', 'scale' or 'none'. If 'scale', subtract the mean and divide by the standard deviation. If 'normalize', i.e., max-min normalize, subtract the min and divide by the max. If 'none', no transformation is applied. More information on what transformation to choose can be acquired here: https://cran.rstudio.com/package=heatmaply/vignettes/heatmaply.html#data-transformation-scaling-normalize-and-percentize
A list of two dataframes (continuous and categorical) from the original dataset.