
Violin plot from a data.table
violin_plot_sc.data.table.RdPer-cell outliers are recomputed within each grouping_column group.
Usage
# S3 method for class 'data.table'
violin_plot_sc(
x,
grouping_column,
variable,
direction = c("twosided", "below", "above"),
threshold = 3,
group_name = NULL,
var_name = NULL,
log_scale = TRUE,
show_outlier = TRUE,
raster = NULL,
palette = BX_PALETTES,
...
)Arguments
- x
data.table. Input data containing the QC metric.
- grouping_column
Character. Column used for the x-axis groups.
- variable
Character. Numeric column to plot on the y-axis.
- direction
Character. One of
"twosided","below","above".- threshold
Numeric. Number of MADs for outlier detection (default: 3).
- group_name
Character. x-axis label (default: NULL).
- var_name
Character. y-axis label (default: NULL).
- log_scale
Logical. Apply a log10 y-axis (default: TRUE).
- show_outlier
Logical. Overlay outlier points (default: TRUE).
- raster
Optional boolean. Shall the plot be rasterised. If
NULLand number of cells is larger than1e5, defaults to TRUE.- palette
String. Discrete palette for the group colours. One of
c("main", "sequential", "diverging", "viridis", "spectral"), seebx_colors(). Ignored whenshow_outlier = TRUE.- ...
Ignored.
Value
A ggplot object.