View source: R/predictors_functions.R
hist_plots | R Documentation |
#' 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" )
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 |
plotly image with the histograms of the selected variables
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.