hist_plots function

hist_plots

hist_plots

#' Function to plot the histograms for all the variables in dat

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

Returns

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)
  • Maintainer: Daniele Bizzarri
  • License: GPL-3
  • Last published: 2024-02-01

Useful links