diff --git a/DESCRIPTION b/DESCRIPTION index 0a11f09a4..d63380632 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -36,7 +36,7 @@ Imports: shinyWidgets, stats, stringr, - teal.code (>= 0.2.0), + teal.code (>= 0.3.0), teal.logger (>= 0.1.1), teal.reporter (>= 0.1.1), teal.slice (>= 0.2.0), diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index a23ea6ef8..a657cce96 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -115,7 +115,7 @@ tm_g_distribution <- function(label = "Distribution Module", if (length(missing_packages) > 0L) { stop(sprintf( "Cannot load package(s): %s.\nInstall or restart your session.", - paste(missing_packages, sep = ", ") + toString(missing_packages) )) } diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index 8dbb5db98..e35372f20 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -145,8 +145,10 @@ tm_g_scatterplot <- function(label = "Scatterplot", extra_packages <- c("ggpmisc", "ggExtra", "colourpicker") missing_packages <- Filter(function(x) !requireNamespace(x, quietly = TRUE), extra_packages) if (length(missing_packages) > 0L) { - stop(sprintf("Cannot load package(s): %s.\nInstall or restart your session.", - paste(missing_packages, sep = ", "))) + stop(sprintf( + "Cannot load package(s): %s.\nInstall or restart your session.", + toString(missing_packages) + )) } if (inherits(x, "data_extract_spec")) x <- list(x) @@ -407,8 +409,9 @@ srv_g_scatterplot <- function(id, function(value) { othervalue <- selector_list()[[other]]()[["select"]] if (!is.null(othervalue)) { - if (identical(value, othervalue)) + if (identical(value, othervalue)) { "Row and column facetting variables must be different." + } } } } @@ -439,9 +442,10 @@ srv_g_scatterplot <- function(id, }) iv_facet <- shinyvalidate::InputValidator$new() iv_facet$add_rule("add_density", ~ if (isTRUE(.) && - (length(selector_list()$row_facet()$select) > 0L || - length(selector_list()$col_facet()$select) > 0L)) - "Cannot add marginal density when Row or Column facetting has been selected") + (length(selector_list()$row_facet()$select) > 0L || + length(selector_list()$col_facet()$select) > 0L)) { + "Cannot add marginal density when Row or Column facetting has been selected" + }) iv_facet$enable() anl_merged_input <- teal.transform::merge_expression_srv( @@ -503,7 +507,7 @@ srv_g_scatterplot <- function(id, eventExpr = merged$anl_input_r()$columns_source[c("col_facet", "row_facet")], handlerExpr = { if (length(merged$anl_input_r()$columns_source$col_facet) == 0 && - length(merged$anl_input_r()$columns_source$row_facet) == 0) { + length(merged$anl_input_r()$columns_source$row_facet) == 0) { shinyjs::hide("free_scales") } else { shinyjs::show("free_scales") @@ -561,8 +565,8 @@ srv_g_scatterplot <- function(id, )) validate(need( !(inherits(ANL[[color_by_var]], "Date") || - inherits(ANL[[color_by_var]], "POSIXct") || - inherits(ANL[[color_by_var]], "POSIXlt")), + inherits(ANL[[color_by_var]], "POSIXct") || + inherits(ANL[[color_by_var]], "POSIXlt")), "Marginal plots cannot be produced when the points are colored by Date or POSIX variables. \n Uncheck the 'Add marginal density' checkbox to display the plot." )) @@ -900,8 +904,8 @@ srv_g_scatterplot <- function(id, if (length(numeric_cols) > 0) { DT::formatRound( DT::datatable(brushed_df, - rownames = FALSE, - options = list(scrollX = TRUE, pageLength = input$data_table_rows) + rownames = FALSE, + options = list(scrollX = TRUE, pageLength = input$data_table_rows) ), numeric_cols, table_dec