Plot stratified feature distributions across splits
Source:R/plot_stratified_feature.R
plot_stratified_feature.Rd
Generates boxplots of scaled feature values across data splits (X, Y, R) stratified by a grouping column, optionally for specified features.
Usage
plot_stratified_feature(
X,
Y,
R,
MX,
MY,
MR,
x_var,
fill_var,
features = NULL,
title = NULL,
x_label = NULL,
y_label = NULL
)
Arguments
- X
Numeric matrix or data.frame of features for cohort X (train).
- Y
Numeric matrix or data.frame of features for cohort Y (test).
- R
Numeric matrix or data.frame of features for cohort R (inference).
- MX
Metadata for `X` (train).
- MY
Metadata for `Y` (test).
- MR
Metadata for `R` (inference).
- x_var
Name of the metadata column for x-axis (string).
- fill_var
Name of the metadata column for fill (string).
- features
Character vector of features to plot (defaults to first 9).
- title
Plot title (optional).
- x_label
Label for x-axis (optional).
- y_label
Label for y-axis (optional).