plot_weights {SUMO}R Documentation

Visualizing the loading of the features

Description

Visualizing the loading of the features

Usage

plot_weights(
  sim_object = NULL,
  factor_num = 1,
  data = "omic.one",
  type = "scatter"
)

Arguments

sim_object

R object containing data to be plotted

factor_num

Factor to be plotted.

data

Section of the integrated data to be plotted, omic.one or omic.two are the options

type

Type of plot. Scatter plot and histogram are the only allowed plots

Value

A ggplot object. If type is "scatter", the function returns a scatter plot visualizing the loadings of features for the selected factor. If type is "histogram", the function returns a histogram displaying the distribution of the loadings for the selected factor. The plot visualizes either omic.one or omic.two data based on the user input in the data parameter. The ggplot object can be further modified or directly plotted.

Examples

# Examples
output_obj <- OmixCraftHD(
  vector_features = c(2000,3000),
  sigmas_vector=c(8,5),
  n_samples=100,
  n_factors=4,
  num.factor='multiple',
  advanced_dist='mixed'
)
plot_weights(sim_object = output_obj, factor_num = 1, data = 'omic.one', type = 'scatter')
plot_weights(sim_object = output_obj, factor_num = 1, data = 'omic.one', type = 'histogram')
plot_weights(sim_object = output_obj, factor_num = 1, data = 'omic.two', type = 'scatter')
plot_weights(sim_object = output_obj, factor_num = 1, data = 'omic.two', type = 'histogram')

[Package SUMO version 0.1.0 Index]