show_sample_missing_values: show_sample_missing_values

View source: R/missing_value_explore_plot.R

show_sample_missing_valuesR Documentation

show_sample_missing_values

Description

show missing values for each sample

Usage

show_sample_missing_values(
  object,
  color_by,
  order_by,
  percentage = FALSE,
  show_x_text = TRUE,
  show_x_ticks = TRUE,
  desc = FALSE
)

Arguments

object

(required) A mass_dataset class object.

color_by

which column (in sample_info) is used to color samples

order_by

which column (in sample_info) is used to order samples

percentage

show MV percentage? TRUE or FALSE.

show_x_text

show x axis text or not? TRUE or FALSE

show_x_ticks

show x ticks or not? TRUE or FALSE

desc

descend sample order or not. TRUE or FALSE.

Value

A ggplot2 object

Author(s)

Xiaotao Shen shenxt1990@outlook.com

Examples

data("expression_data")
data("sample_info")
data("variable_info")

object =
  create_mass_dataset(
    expression_data = expression_data,
    sample_info = sample_info,
    variable_info = variable_info,
  )

object

##show missing values plot
show_sample_missing_values(object)
show_sample_missing_values(object, color_by = "class")
show_sample_missing_values(object, color_by = "class", order_by = "na")
show_sample_missing_values(object, color_by = "class", order_by = "na",
                           desc = TRUE)

tidymass/massdataset documentation built on Sept. 14, 2024, 4:41 p.m.