View source: R/cell_layer_vio_ggplot_func.R
cell_layer_vio_ggplot_func | R Documentation |
Create a base canvas violin ggplot object. This function make violin plot with aggregated waves (average) at the cellular level. Note: this function is wrapped inside the final superplot function.
cell_layer_vio_ggplot_func( dataset, yaxe, xaxe = "Animal", my_grouping_vars = c("Animal_No", "Animal", "Condition", "Treatment", "Experiment"), faceted_by_1 = "Condition", faceted_by_2 = ".", y_limits, alpha_line = 1, line_size = 1, trim = FALSE, scaled_to = "width", adjusted = 1 )
dataset |
A dataframe object. The dataset for analysis, eg wave kinetics or wave occurrence df. |
yaxe |
A string. The variable name of interest to plot. |
xaxe |
A string. The variable you want to compare with. Default to |
my_grouping_vars |
Character vector. A character vector of groups names assigned to perform the cell aggregation. Don't change at least you know what you are doing! |
faceted_by_1 |
A string. Grouping variables for visualization. Default to |
faceted_by_2 |
A string. Additional grouping variables for visualization. Default to |
y_limits |
A pair or single double value. Optional parameter to set the upper and lower y axis limit of your plot. If a single value provided, it will be used as upper limit. |
alpha_line |
Double. Adjust transparency to the violin line. |
line_size |
Integer. the size of the lines to display. |
trim |
Logic. shall the edges of the violin plots be cutted off?. Default to FALSE |
scaled_to |
Character string. If "area" (default), all violins have the same area (before trimming the tails). If "count", areas are scaled proportionally to the number of observations. If "width", all violins have the same maximum width. |
adjusted |
Double. A multiplicate bandwidth adjustment. This makes it possible to adjust the bandwidth while still using the a bandwidth estimator. For example, adjust = 1/2 means use half of the default bandwidth. |
A ggplot object with a violin plot canvas to add additional layers.
# the example is missing
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.