hist_plots {MiMIR} | R Documentation |
hist_plots
Description
#' Function to plot the histograms for all the variables in dat
Usage
hist_plots(
dat,
x_name,
color = MiMIR::c21,
scaled = FALSE,
datatype = "metabolic score",
main = "Predictors Distributions"
)
Arguments
dat |
data.frame or matrix with the variables to plot |
x_name |
string with the names of the selected variables in dat |
color |
colors selected for all the variables |
scaled |
logical to z-scale the variables |
datatype |
a character vector indicating what data type is beeing plotted |
main |
title of the plot |
Value
plotly image with the histograms of the selected variables
Examples
require(MiMIR)
require(plotly)
require(matrixStats)
#load the metabolites dataset
m <- synthetic_metabolic_dataset
#Apply a surrogate models and plot the ROC curve
surrogates<-calculate_surrogate_scores(m, PARAM_surrogates=MiMIR::PARAM_surrogates, roc=FALSE)
#Plot the histogram of the surrogate sex values scaled
hist_plots(surrogates$surrogates, x_name="s_sex", scaled=TRUE)
[Package MiMIR version 1.5 Index]