| plot_violins {autonomics} | R Documentation |
Plot sample/feature violins
plot_violins( object, x, fill, color = NULL, group = NULL, facet = NULL, highlight = NULL, fixed = list(na.rm = TRUE) ) plot_sample_violins( object, x = sample_id, fill = sample_id, color = NULL, highlight = NULL, fixed = list(na.rm = TRUE) ) plot_feature_violins( object, x = feature_id, fill = feature_name, color = NULL, highlight = NULL, fixed = list(na.rm = TRUE) ) plot_subgroup_violins( object, subgroup, x = !!enquo(subgroup), fill = !!enquo(subgroup), color = NULL, highlight = NULL, facet = feature_id, fixed = list(na.rm = TRUE) )
object |
SummarizedExperiment |
x |
svar mapped to x |
fill |
svar mapped to fill |
color |
svar mapped to color |
group |
svar mapped to group |
facet |
svar mapped to facets |
highlight |
fvar expressing which feature should be highlighted |
fixed |
fixed aesthetics |
subgroup |
subgroup svar |
ggplot object
plot_sample_densities,
plot_sample_boxplots
# data
require(magrittr)
file <- download_data('halama18.metabolon.xlsx')
object <- read_metabolon(file, plot = FALSE)
object %<>% extract(, order(.$Group))
control_features <- c('biotin','phosphate')
fdata(object) %<>% cbind(control=.$feature_name %in% control_features)
# plot
plot_violins(object[1:12, ], x=feature_id, fill=feature_id)
plot_feature_violins(object[1:12, ])
plot_sample_violins(object[, 1:12], highlight = control)
plot_subgroup_violins(object[1:4, ], subgroup = Group)