plot_association: Plot association matrices of real and synthetic data

View source: R/plots.R

plot_associationR Documentation

Plot association matrices of real and synthetic data

Description

Heatmaps of the mixed-type association_matrix() of the real data, the synthetic data and their difference (synthetic minus real), on a common diverging scale.

Usage

plot_association(real, synthetic = NULL, vars = NULL, show_values = NULL)

Arguments

real

A data frame (or vector/matrix) with the real data.

synthetic

Optional synthetic data with the same columns.

vars

Variables to plot (default: all, up to max_vars per kind).

show_values

Print the values in the cells? (Default: when there are at most 8 variables.)

Value

A ggplot object.

Examples

syn <- synthesize(mtcars, seed = 1)
plot_association(mtcars, syn, vars = c("mpg", "cyl", "disp", "hp", "wt"))

SynthesizerPlus documentation built on Oct. 16, 2026, 5:10 p.m.