plot_densities | R Documentation |
Plot sample/feature distributions
plot_densities(
object,
assay = assayNames(object)[1],
group,
fill,
color = NULL,
linetype = NULL,
facet = NULL,
nrow = NULL,
ncol = NULL,
dir = "h",
scales = "free_y",
labeller = label_value,
palette = NULL,
fixed = list(alpha = 0.8, na.rm = TRUE)
)
plot_sample_densities(
object,
assay = assayNames(object)[1],
group = "sample_id",
fill = if ("subgroup" %in% svars(object)) "subgroup" else "sample_id",
color = NULL,
linetype = NULL,
n = 100,
facet = NULL,
nrow = NULL,
ncol = NULL,
dir = "h",
scales = "free_y",
labeller = label_value,
palette = NULL,
fixed = list(alpha = 0.8, na.rm = TRUE)
)
plot_feature_densities(
object,
assay = assayNames(object)[1],
fill = "feature_id",
group = fill,
color = NULL,
linetype = NULL,
n = 9,
facet = NULL,
nrow = NULL,
ncol = NULL,
dir = "h",
scales = "free",
labeller = label_value,
palette = NULL,
fixed = list(alpha = 0.8, na.rm = TRUE)
)
object |
SummarizedExperiment |
assay |
string |
group |
svar (string) |
fill |
svar (string) |
color |
svar (string) |
linetype |
svar (string) |
facet |
svar (character vector) |
nrow |
number of facet rows |
ncol |
number of facet cols |
dir |
'h' (horizontal) or 'v' (vertical) |
scales |
'free', 'fixed', 'free_y' |
labeller |
e.g. label_value |
palette |
named character vector |
fixed |
fixed aesthetics |
n |
number |
ggplot object
plot_sample_violins
,
plot_sample_boxplots
# Data
file <- system.file('extdata/atkin.metabolon.xlsx', package = 'autonomics')
object <- read_metabolon(file)
object %<>% extract(, order(.$subgroup))
# Sample distributions
plot_sample_densities(object)
plot_sample_violins( object, facet = 'Time')
plot_sample_boxplots(object)
plot_exprs(object)
plot_exprs(object, dim = 'samples', x = 'subgroup', facet = 'Time')
# Feature distributions
plot_feature_densities(object)
plot_feature_violins( object)
plot_feature_boxplots( object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.