|
@@ -521,6 +521,24 @@ generate_scatter_plot <- function(plot, config, interactive = FALSE) {
|
|
return(plot)
|
|
return(plot)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+generate_box_plot <- function(plot, config) {
|
|
|
|
+ plot <- plot + geom_boxplot()
|
|
|
|
+
|
|
|
|
+ if (!is.null(config$x_breaks) && !is.null(config$x_labels) && !is.null(config$x_label)) {
|
|
|
|
+ plot <- plot + scale_x_discrete(
|
|
|
|
+ name = config$x_label,
|
|
|
|
+ breaks = config$x_breaks,
|
|
|
|
+ labels = config$x_labels
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!is.null(config$coord_cartesian)) {
|
|
|
|
+ plot <- plot + coord_cartesian(ylim = config$coord_cartesian)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return(plot)
|
|
|
|
+}
|
|
|
|
+
|
|
# Adjust missing values and calculate ranks
|
|
# Adjust missing values and calculate ranks
|
|
adjust_missing_and_rank <- function(df, variables) {
|
|
adjust_missing_and_rank <- function(df, variables) {
|
|
|
|
|