show missing values for each variable
show_variable_missing_values(
object,
color_by,
order_by,
percentage = FALSE,
show_x_text = FALSE,
show_x_ticks = FALSE,
desc = FALSE
)
(required) mass_dataset class object.
which column (in variable_info) is used to color variables
which column (in variable_info) is used to order variables
show MV percentage? TRUE or FALSE
show x axis text or not? TRUE or FALSE
show x ticks or not? TRUE or FALSE
descend sample order or not. TRUE or FALSE.
A ggplot2 object
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
#> --------------------
#> massdataset version: 1.0.33
#> --------------------
#> 1.expression_data:[ 1000 x 8 data.frame]
#> 2.sample_info:[ 8 x 4 data.frame]
#> 8 samples:Blank_3 Blank_4 QC_1 ... PS4P3 PS4P4
#> 3.variable_info:[ 1000 x 3 data.frame]
#> 1000 variables:M136T55_2_POS M79T35_POS M307T548_POS ... M232T937_POS M301T277_POS
#> 4.sample_info_note:[ 4 x 2 data.frame]
#> 5.variable_info_note:[ 3 x 2 data.frame]
#> 6.ms2_data:[ 0 variables x 0 MS2 spectra]
#> --------------------
#> Processing information
#> 1 processings in total
#> create_mass_dataset ----------
#> Package Function.used Time
#> 1 massdataset create_mass_dataset() 2024-09-06 08:50:00
##show missing values plot
show_variable_missing_values(object)
show_variable_missing_values(object, color_by = "mz")
library(ggplot2)
show_variable_missing_values(object, color_by = "rt") +
ggplot2::scale_color_gradient(low = "skyblue", high = "red")
show_variable_missing_values(object, color_by = "mz",
order_by = "na")
show_variable_missing_values(object, color_by = "mz",
order_by = "na",
desc = TRUE, percentage = TRUE)