From b329cb453320781a1eb56bd81928a1fcd650abab Mon Sep 17 00:00:00 2001 From: Aleksander Chlebowski Date: Wed, 14 Feb 2024 17:38:02 +0100 Subject: [PATCH 1/9] remove deprecated roxygen tag --- R/teal.modules.general.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/teal.modules.general.R b/R/teal.modules.general.R index 0df71c52c..74c5d52c2 100644 --- a/R/teal.modules.general.R +++ b/R/teal.modules.general.R @@ -12,10 +12,9 @@ #' @importFrom magrittr %>% #' #' -#' @docType package #' @name teal.modules.general #' @keywords internal -NULL +"_PACKAGE" # nolint start # Note ggmosaic (version <= 0.3.3) needs to be in DEPENDS as the following does not work if it is imported From d7b3b20486c839bee38a733e5382e875bb8640c0 Mon Sep 17 00:00:00 2001 From: Aleksander Chlebowski Date: Wed, 14 Feb 2024 17:38:19 +0100 Subject: [PATCH 2/9] add global variable that lists available ggplot2 themes --- R/zzz.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/zzz.R b/R/zzz.R index c99f35e18..5ac1d3622 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -1,3 +1,5 @@ .onLoad <- function(libname, pkgname) { # nolint teal.logger::register_logger(namespace = "teal.modules.general") } + +ggplot_themes <- c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void") From 54bd02f4ac251fd9c9f85e46422a760aa93e60c6 Mon Sep 17 00:00:00 2001 From: Aleksander Chlebowski Date: Wed, 14 Feb 2024 17:39:12 +0100 Subject: [PATCH 3/9] remove test theme from docs, defaults, and calls --- R/tm_a_pca.R | 4 ++-- R/tm_a_regression.R | 7 ++----- R/tm_g_association.R | 22 ++++++---------------- R/tm_g_bivariate.R | 4 ++-- R/tm_g_distribution.R | 7 ++----- R/tm_g_response.R | 4 ++-- R/tm_g_scatterplot.R | 7 ++----- R/tm_missing_data.R | 11 +++-------- R/tm_outliers.R | 4 ++-- R/tm_variable_browser.R | 5 +---- R/utils.R | 4 +--- 11 files changed, 25 insertions(+), 54 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 1606862a8..60ff4756a 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -61,7 +61,7 @@ tm_a_pca <- function(label = "Principal Component Analysis", dat, plot_height = c(600, 200, 2000), plot_width = NULL, - ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), ggplot2_args = teal.widgets::ggplot2_args(), rotate_xaxis_labels = FALSE, font_size = c(12, 8, 20), @@ -225,7 +225,7 @@ ui_a_pca <- function(id, ...) { selectInput( inputId = ns("ggtheme"), label = "Theme (by ggplot):", - choices = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + choices = ggplot_themes, selected = args$ggtheme, multiple = FALSE ), diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index 34e25eee3..e4fdd1ddc 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -84,10 +84,7 @@ tm_a_regression <- function(label = "Regression Analysis", plot_width = NULL, alpha = c(1, 0, 1), size = c(2, 1, 8), - ggtheme = c( - "gray", "bw", "linedraw", "light", "dark", - "minimal", "classic", "void", "test" - ), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), ggplot2_args = teal.widgets::ggplot2_args(), pre_output = NULL, post_output = NULL, @@ -217,7 +214,7 @@ ui_a_regression <- function(id, ...) { selectInput( inputId = ns("ggtheme"), label = "Theme (by ggplot):", - choices = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + choices = ggplot_themes, selected = args$ggtheme, multiple = FALSE ) diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 2a4bf5625..ec7688372 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -9,12 +9,8 @@ #' associated variables. #' @param show_association optional, (`logical`) Whether show association of `vars` #' with reference variable. Defaults to `TRUE`. -#' @param distribution_theme optional, (`character`) `ggplot2` theme to be used by default. -#' One of `c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")`. -#' Each theme can be chosen by the user during the session. Defaults to `"gray"`. -#' @param association_theme optional, (`character`) `ggplot2` theme to be used by default. -#' One of `c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")`. -#' Each theme can be chosen by the user during the session. Defaults to `"gray"`. +#' @param distribution_theme,association_theme optional, (`character`) `ggplot2` themes to be used by default. +#' Default to `"gray"`. #' #' @templateVar ggnames "Bivariate1", "Bivariate2" #' @template ggplot2_args_multi @@ -78,14 +74,8 @@ tm_g_association <- function(label = "Association", show_association = TRUE, plot_height = c(600, 400, 5000), plot_width = NULL, - distribution_theme = c( - "gray", "bw", "linedraw", "light", "dark", - "minimal", "classic", "void", "test" - ), - association_theme = c( - "gray", "bw", "linedraw", "light", "dark", - "minimal", "classic", "void", "test" - ), + distribution_theme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), # nolint + association_theme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), # nolint pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args()) { @@ -188,14 +178,14 @@ ui_tm_g_association <- function(id, ...) { selectInput( inputId = ns("distribution_theme"), label = "Distribution theme (by ggplot):", - choices = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + choices = ggplot_themes, selected = args$distribution_theme, multiple = FALSE ), selectInput( inputId = ns("association_theme"), label = "Association theme (by ggplot):", - choices = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + choices = ggplot_themess, selected = args$association_theme, multiple = FALSE ) diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index 2ec66c397..2a1ddd072 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -121,7 +121,7 @@ tm_g_bivariate <- function(label = "Bivariate Plots", plot_width = NULL, rotate_xaxis_labels = FALSE, swap_axes = FALSE, - ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), ggplot2_args = teal.widgets::ggplot2_args(), pre_output = NULL, post_output = NULL) { @@ -338,7 +338,7 @@ ui_g_bivariate <- function(id, ...) { selectInput( inputId = ns("ggtheme"), label = "Theme (by ggplot):", - choices = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + choices = ggplot_themes, selected = args$ggtheme, multiple = FALSE ), diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 310b95cfd..72d9f0f52 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -109,10 +109,7 @@ tm_g_distribution <- function(label = "Distribution Module", strata_var = NULL, group_var = NULL, freq = FALSE, - ggtheme = c( - "gray", "bw", "linedraw", "light", "dark", - "minimal", "classic", "void", "test" - ), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), ggplot2_args = teal.widgets::ggplot2_args(), bins = c(30L, 1L, 100L), plot_height = c(600, 200, 2000), @@ -303,7 +300,7 @@ ui_distribution <- function(id, ...) { selectInput( inputId = ns("ggtheme"), label = "Theme (by ggplot):", - choices = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + choices = ggplot_themes, selected = args$ggtheme, multiple = FALSE ) diff --git a/R/tm_g_response.R b/R/tm_g_response.R index ce0c60a86..8c3d96596 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -81,7 +81,7 @@ tm_g_response <- function(label = "Response Plot", freq = FALSE, plot_height = c(600, 400, 5000), plot_width = NULL, - ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), ggplot2_args = teal.widgets::ggplot2_args(), pre_output = NULL, post_output = NULL) { @@ -203,7 +203,7 @@ ui_g_response <- function(id, ...) { selectInput( inputId = ns("ggtheme"), label = "Theme (by ggplot):", - choices = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + choices = ggplot_themes, selected = args$ggtheme, multiple = FALSE ) diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index cae83d74d..984a50b62 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -152,10 +152,7 @@ tm_g_scatterplot <- function(label = "Scatterplot", size = c(5, 1, 15), max_deg = 5L, rotate_xaxis_labels = FALSE, - ggtheme = c( - "gray", "bw", "linedraw", "light", "dark", - "minimal", "classic", "void", "test" - ), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), pre_output = NULL, post_output = NULL, table_dec = 4, @@ -381,7 +378,7 @@ ui_g_scatterplot <- function(id, ...) { selectInput( inputId = ns("ggtheme"), label = "Theme (by ggplot):", - choices = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + choices = ggplot_themes, selected = args$ggtheme, multiple = FALSE ) diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index c8b502da9..8f66fe2a4 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -7,9 +7,7 @@ #' @inheritParams shared_params #' @param parent_dataname (`character(1)`) If this `dataname` exists in then "the by subject"graph is displayed. #' For `CDISC` data. In non `CDISC` data this can be ignored. Defaults to `"ADSL"`. -#' @param ggtheme optional, (`character`) `ggplot2` theme to be used by default. -#' One of `c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")`. -#' Each theme can be chosen by the user during the session. Defaults to `"classic"`. +#' @param ggtheme optional, (`character`) `ggplot2` theme to be used by default. Defaults to `"classic"`. #' #' @templateVar ggnames "Summary Obs", "Summary Patients", "Combinations Main", "Combinations Hist", "By Subject" #' @template ggplot2_args_multi @@ -48,10 +46,7 @@ tm_missing_data <- function(label = "Missing data", plot_height = c(600, 400, 5000), plot_width = NULL, parent_dataname = "ADSL", - ggtheme = c( - "classic", "gray", "bw", "linedraw", - "light", "dark", "minimal", "void", "test" - ), + ggtheme = c("classic", "gray", "bw", "linedraw", "light", "dark", "minimal", "void"), ggplot2_args = list( "Combinations Hist" = teal.widgets::ggplot2_args(labs = list(caption = NULL)), "Combinations Main" = teal.widgets::ggplot2_args(labs = list(title = NULL)) @@ -353,7 +348,7 @@ encoding_missing_data <- function(id, summary_per_patient = FALSE, ggtheme, data selectInput( inputId = ns("ggtheme"), label = "Theme (by ggplot):", - choices = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + choices = ggplot_themes, selected = ggtheme, multiple = FALSE ) diff --git a/R/tm_outliers.R b/R/tm_outliers.R index 42b5976ef..fd7c3f8f3 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -69,7 +69,7 @@ tm_outliers <- function(label = "Outliers Module", outlier_var, categorical_var = NULL, - ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), ggplot2_args = teal.widgets::ggplot2_args(), plot_height = c(600, 200, 2000), plot_width = NULL, @@ -231,7 +231,7 @@ ui_outliers <- function(id, ...) { selectInput( inputId = ns("ggtheme"), label = "Theme (by ggplot):", - choices = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test"), + choices = ggplot_themes, selected = args$ggtheme, multiple = FALSE ) diff --git a/R/tm_variable_browser.R b/R/tm_variable_browser.R index 901d3ca18..cb46e5db0 100644 --- a/R/tm_variable_browser.R +++ b/R/tm_variable_browser.R @@ -139,10 +139,7 @@ ui_variable_browser <- function(id, collapsed = TRUE, selectInput( inputId = ns("ggplot_theme"), label = "ggplot2 theme", - choices = c( - "gray", "bw", "linedraw", "light", - "dark", "minimal", "classic", "void", "test" - ), + choices = ggplot_themes, selected = "grey" ), fluidRow( diff --git a/R/utils.R b/R/utils.R index 07db56a98..1d2a1e56d 100644 --- a/R/utils.R +++ b/R/utils.R @@ -9,9 +9,7 @@ #' for a slider encoding the plot width. #' @param rotate_xaxis_labels optional, (`logical`) Whether to rotate plot X axis labels. Does not #' rotate by default (`FALSE`). -#' @param ggtheme optional, (`character`) `ggplot2` theme to be used by default. -#' One of `c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")`. -#' Each theme can be chosen by the user during the session. Defaults to `"gray"`. +#' @param ggtheme optional, (`character`) `ggplot2` theme to be used by default. Defaults to `"gray"`. #' @param ggplot2_args (`ggplot2_args`) object created by [teal.widgets::ggplot2_args()] #' with settings for the module plot. #' The argument is merged with options variable `teal.ggplot2_args` and default module setup. From 823163509d04f4d84620f55951998b93d2d364c1 Mon Sep 17 00:00:00 2001 From: Aleksander Chlebowski Date: Wed, 14 Feb 2024 17:39:38 +0100 Subject: [PATCH 4/9] amend documentation --- man/shared_params.Rd | 4 +--- man/tm_a_pca.Rd | 11 ++++------- man/tm_a_regression.Rd | 11 ++++------- man/tm_data_table.Rd | 4 ++-- man/tm_file_viewer.Rd | 4 ++-- man/tm_front_page.Rd | 4 ++-- man/tm_g_association.Rd | 17 ++++++----------- man/tm_g_bivariate.Rd | 11 ++++------- man/tm_g_distribution.Rd | 11 ++++------- man/tm_g_response.Rd | 11 ++++------- man/tm_g_scatterplot.Rd | 11 ++++------- man/tm_g_scatterplotmatrix.Rd | 4 ++-- man/tm_missing_data.Rd | 11 ++++------- man/tm_outliers.Rd | 11 ++++------- man/tm_t_crosstable.Rd | 4 ++-- man/tm_variable_browser.Rd | 4 ++-- 16 files changed, 51 insertions(+), 82 deletions(-) diff --git a/man/shared_params.Rd b/man/shared_params.Rd index b80f052b5..f7fb3ffac 100644 --- a/man/shared_params.Rd +++ b/man/shared_params.Rd @@ -13,9 +13,7 @@ for a slider encoding the plot width.} \item{rotate_xaxis_labels}{optional, (\code{logical}) Whether to rotate plot X axis labels. Does not rotate by default (\code{FALSE}).} -\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. -One of \code{c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")}. -Each theme can be chosen by the user during the session. Defaults to \code{"gray"}.} +\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. Defaults to \code{"gray"}.} \item{ggplot2_args}{(\code{ggplot2_args}) object created by \code{\link[teal.widgets:ggplot2_args]{teal.widgets::ggplot2_args()}} with settings for the module plot. diff --git a/man/tm_a_pca.Rd b/man/tm_a_pca.Rd index bf8eadfd8..745bcd36e 100644 --- a/man/tm_a_pca.Rd +++ b/man/tm_a_pca.Rd @@ -9,8 +9,7 @@ tm_a_pca( dat, plot_height = c(600, 200, 2000), plot_width = NULL, - ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", - "test"), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), ggplot2_args = teal.widgets::ggplot2_args(), rotate_xaxis_labels = FALSE, font_size = c(12, 8, 20), @@ -21,8 +20,8 @@ tm_a_pca( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{dat}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Columns used to compute PCA.} @@ -33,9 +32,7 @@ for a slider encoding the plot height.} \item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} for a slider encoding the plot width.} -\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. -One of \code{c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")}. -Each theme can be chosen by the user during the session. Defaults to \code{"gray"}.} +\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. Defaults to \code{"gray"}.} \item{ggplot2_args}{optional, (\code{ggplot2_args}) object created by \code{\link[teal.widgets:ggplot2_args]{teal.widgets::ggplot2_args()}} with settings for all the plots or named list of \code{ggplot2_args} objects for plot-specific settings. diff --git a/man/tm_a_regression.Rd b/man/tm_a_regression.Rd index d4700b3cb..8a4182664 100644 --- a/man/tm_a_regression.Rd +++ b/man/tm_a_regression.Rd @@ -12,8 +12,7 @@ tm_a_regression( plot_width = NULL, alpha = c(1, 0, 1), size = c(2, 1, 8), - ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", - "test"), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), ggplot2_args = teal.widgets::ggplot2_args(), pre_output = NULL, post_output = NULL, @@ -22,8 +21,8 @@ tm_a_regression( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{regressor}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Regressor variables from an incoming dataset with filtering and selecting.} @@ -45,9 +44,7 @@ length three with \code{c(value, min, max)}.} If a slider should be presented to adjust the plot point sizes dynamically then it can be a vector of length three with \code{c(value, min, max)}.} -\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. -One of \code{c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")}. -Each theme can be chosen by the user during the session. Defaults to \code{"gray"}.} +\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. Defaults to \code{"gray"}.} \item{ggplot2_args}{optional, (\code{ggplot2_args}) object created by \code{\link[teal.widgets:ggplot2_args]{teal.widgets::ggplot2_args()}} with settings for all the plots or named list of \code{ggplot2_args} objects for plot-specific settings. diff --git a/man/tm_data_table.Rd b/man/tm_data_table.Rd index bec8cde63..ecd5982f1 100644 --- a/man/tm_data_table.Rd +++ b/man/tm_data_table.Rd @@ -17,8 +17,8 @@ tm_data_table( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{variables_selected}{(\code{list}) A named list of character vectors of the variables (i.e. columns) which should be initially shown for each dataset. Names of list elements should correspond to the names diff --git a/man/tm_file_viewer.Rd b/man/tm_file_viewer.Rd index a1be536fb..c38c5fd15 100644 --- a/man/tm_file_viewer.Rd +++ b/man/tm_file_viewer.Rd @@ -10,8 +10,8 @@ tm_file_viewer( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{input_path}{optional, (\code{list}) of the input paths to either: specific files of accepted formats, a directory or a URL. The paths can be specified as absolute paths or relative to the running diff --git a/man/tm_front_page.Rd b/man/tm_front_page.Rd index 0efa390d0..66e17acb0 100644 --- a/man/tm_front_page.Rd +++ b/man/tm_front_page.Rd @@ -14,8 +14,8 @@ tm_front_page( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{header_text}{\verb{character vector} text to be shown at the top of the module, for each element, if named the name is shown first in bold as a header followed by the value. The first diff --git a/man/tm_g_association.Rd b/man/tm_g_association.Rd index a765bd2ef..7cbc13945 100644 --- a/man/tm_g_association.Rd +++ b/man/tm_g_association.Rd @@ -12,17 +12,17 @@ tm_g_association( plot_height = c(600, 400, 5000), plot_width = NULL, distribution_theme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", - "void", "test"), + "void"), association_theme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", - "void", "test"), + "void"), pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args() ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{ref}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) reference variable, must set \code{multiple = FALSE}.} @@ -39,13 +39,8 @@ for a slider encoding the plot height.} \item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} for a slider encoding the plot width.} -\item{distribution_theme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. -One of \code{c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")}. -Each theme can be chosen by the user during the session. Defaults to \code{"gray"}.} - -\item{association_theme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. -One of \code{c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")}. -Each theme can be chosen by the user during the session. Defaults to \code{"gray"}.} +\item{distribution_theme, association_theme}{optional, (\code{character}) \code{ggplot2} themes to be used by default. +Default to \code{"gray"}.} \item{pre_output}{(\code{shiny.tag}, optional)\cr with text placed before the output to put the output into context. For example a title.} diff --git a/man/tm_g_bivariate.Rd b/man/tm_g_bivariate.Rd index 430b6894a..82e6bf9b5 100644 --- a/man/tm_g_bivariate.Rd +++ b/man/tm_g_bivariate.Rd @@ -22,16 +22,15 @@ tm_g_bivariate( plot_width = NULL, rotate_xaxis_labels = FALSE, swap_axes = FALSE, - ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", - "test"), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), ggplot2_args = teal.widgets::ggplot2_args(), pre_output = NULL, post_output = NULL ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{x}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Variable names selected to plot along the x-axis by default. Variable can be numeric, factor or character. @@ -85,9 +84,7 @@ rotate by default (\code{FALSE}).} \item{swap_axes}{optional, (\code{logical}) Whether to swap X and Y axes. Defaults to \code{FALSE}.} -\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. -One of \code{c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")}. -Each theme can be chosen by the user during the session. Defaults to \code{"gray"}.} +\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. Defaults to \code{"gray"}.} \item{ggplot2_args}{(\code{ggplot2_args}) object created by \code{\link[teal.widgets:ggplot2_args]{teal.widgets::ggplot2_args()}} with settings for the module plot. diff --git a/man/tm_g_distribution.Rd b/man/tm_g_distribution.Rd index 6be2badf0..676140a02 100644 --- a/man/tm_g_distribution.Rd +++ b/man/tm_g_distribution.Rd @@ -10,8 +10,7 @@ tm_g_distribution( strata_var = NULL, group_var = NULL, freq = FALSE, - ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", - "test"), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), ggplot2_args = teal.widgets::ggplot2_args(), bins = c(30L, 1L, 100L), plot_height = c(600, 200, 2000), @@ -21,8 +20,8 @@ tm_g_distribution( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{dist_var}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Variable to consider for the distribution analysis.} @@ -36,9 +35,7 @@ Which data columns to use for faceting rows.} \item{freq}{optional, (\code{logical}) Whether to display frequency (\code{TRUE}) or density (\code{FALSE}). Defaults to density (\code{FALSE}).} -\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. -One of \code{c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")}. -Each theme can be chosen by the user during the session. Defaults to \code{"gray"}.} +\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. Defaults to \code{"gray"}.} \item{ggplot2_args}{optional, (\code{ggplot2_args}) object created by \code{\link[teal.widgets:ggplot2_args]{teal.widgets::ggplot2_args()}} with settings for all the plots or named list of \code{ggplot2_args} objects for plot-specific settings. diff --git a/man/tm_g_response.Rd b/man/tm_g_response.Rd index 9df112bda..ed92b2148 100644 --- a/man/tm_g_response.Rd +++ b/man/tm_g_response.Rd @@ -16,16 +16,15 @@ tm_g_response( freq = FALSE, plot_height = c(600, 400, 5000), plot_width = NULL, - ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", - "test"), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), ggplot2_args = teal.widgets::ggplot2_args(), pre_output = NULL, post_output = NULL ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{response}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Which variable to use as the response. You can define one fixed column by using the @@ -60,9 +59,7 @@ for a slider encoding the plot height.} \item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} for a slider encoding the plot width.} -\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. -One of \code{c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")}. -Each theme can be chosen by the user during the session. Defaults to \code{"gray"}.} +\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. Defaults to \code{"gray"}.} \item{ggplot2_args}{(\code{ggplot2_args}) object created by \code{\link[teal.widgets:ggplot2_args]{teal.widgets::ggplot2_args()}} with settings for the module plot. diff --git a/man/tm_g_scatterplot.Rd b/man/tm_g_scatterplot.Rd index ecd33de66..bd9873661 100644 --- a/man/tm_g_scatterplot.Rd +++ b/man/tm_g_scatterplot.Rd @@ -19,8 +19,7 @@ tm_g_scatterplot( size = c(5, 1, 15), max_deg = 5L, rotate_xaxis_labels = FALSE, - ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", - "test"), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), pre_output = NULL, post_output = NULL, table_dec = 4, @@ -28,8 +27,8 @@ tm_g_scatterplot( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{x}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Variable names selected to plot along the x-axis by default.} @@ -72,9 +71,7 @@ vector of length three with \code{c(value, min, max)}.} \item{rotate_xaxis_labels}{optional, (\code{logical}) Whether to rotate plot X axis labels. Does not rotate by default (\code{FALSE}).} -\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. -One of \code{c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")}. -Each theme can be chosen by the user during the session. Defaults to \code{"gray"}.} +\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. Defaults to \code{"gray"}.} \item{pre_output}{(\code{shiny.tag}, optional)\cr with text placed before the output to put the output into context. For example a title.} diff --git a/man/tm_g_scatterplotmatrix.Rd b/man/tm_g_scatterplotmatrix.Rd index 0bc3b8782..202ea0583 100644 --- a/man/tm_g_scatterplotmatrix.Rd +++ b/man/tm_g_scatterplotmatrix.Rd @@ -14,8 +14,8 @@ tm_g_scatterplotmatrix( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{variables}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Plotting variables from an incoming dataset with filtering and selecting. In case of diff --git a/man/tm_missing_data.Rd b/man/tm_missing_data.Rd index 73438aa4f..8d7edacdb 100644 --- a/man/tm_missing_data.Rd +++ b/man/tm_missing_data.Rd @@ -9,8 +9,7 @@ tm_missing_data( plot_height = c(600, 400, 5000), plot_width = NULL, parent_dataname = "ADSL", - ggtheme = c("classic", "gray", "bw", "linedraw", "light", "dark", "minimal", "void", - "test"), + ggtheme = c("classic", "gray", "bw", "linedraw", "light", "dark", "minimal", "void"), ggplot2_args = list(`Combinations Hist` = teal.widgets::ggplot2_args(labs = list(caption = NULL)), `Combinations Main` = teal.widgets::ggplot2_args(labs = list(title = NULL))), @@ -19,8 +18,8 @@ tm_missing_data( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} for a slider encoding the plot height.} @@ -31,9 +30,7 @@ for a slider encoding the plot width.} \item{parent_dataname}{(\code{character(1)}) If this \code{dataname} exists in then "the by subject"graph is displayed. For \code{CDISC} data. In non \code{CDISC} data this can be ignored. Defaults to \code{"ADSL"}.} -\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. -One of \code{c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")}. -Each theme can be chosen by the user during the session. Defaults to \code{"classic"}.} +\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. Defaults to \code{"classic"}.} \item{ggplot2_args}{optional, (\code{ggplot2_args}) object created by \code{\link[teal.widgets:ggplot2_args]{teal.widgets::ggplot2_args()}} with settings for all the plots or named list of \code{ggplot2_args} objects for plot-specific settings. diff --git a/man/tm_outliers.Rd b/man/tm_outliers.Rd index dd262f2ab..e10085814 100644 --- a/man/tm_outliers.Rd +++ b/man/tm_outliers.Rd @@ -8,8 +8,7 @@ tm_outliers( label = "Outliers Module", outlier_var, categorical_var = NULL, - ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", - "test"), + ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), ggplot2_args = teal.widgets::ggplot2_args(), plot_height = c(600, 200, 2000), plot_width = NULL, @@ -18,8 +17,8 @@ tm_outliers( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{outlier_var}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) variable to consider for the outliers analysis.} @@ -27,9 +26,7 @@ variable to consider for the outliers analysis.} \item{categorical_var}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) categorical factor to split the selected outlier variables on.} -\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. -One of \code{c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void", "test")}. -Each theme can be chosen by the user during the session. Defaults to \code{"gray"}.} +\item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. Defaults to \code{"gray"}.} \item{ggplot2_args}{optional, (\code{ggplot2_args}) object created by \code{\link[teal.widgets:ggplot2_args]{teal.widgets::ggplot2_args()}} with settings for all the plots or named list of \code{ggplot2_args} objects for plot-specific settings. diff --git a/man/tm_t_crosstable.Rd b/man/tm_t_crosstable.Rd index d7cf28179..b17bb2f94 100644 --- a/man/tm_t_crosstable.Rd +++ b/man/tm_t_crosstable.Rd @@ -16,8 +16,8 @@ tm_t_crosstable( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{x}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Object with all available choices with pre-selected option for variable X - row values. In case diff --git a/man/tm_variable_browser.Rd b/man/tm_variable_browser.Rd index 5b12bd007..511b8ee99 100644 --- a/man/tm_variable_browser.Rd +++ b/man/tm_variable_browser.Rd @@ -20,8 +20,8 @@ tm_variable_browser( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. -For \code{modules()} defaults to \code{"root"}. See \code{Details}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except +\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} \item{datasets_selected}{(\code{character}) A vector of datasets which should be shown and in what order. Names in the vector have to correspond with datasets names. From 614397c2afd904dd3713e23e081261bce4075d32 Mon Sep 17 00:00:00 2001 From: "27856297+dependabot-preview[bot]@users.noreply.github.com" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:49:03 +0000 Subject: [PATCH 5/9] [skip actions] Roxygen Man Pages Auto Update --- man/tm_a_pca.Rd | 4 ++-- man/tm_a_regression.Rd | 4 ++-- man/tm_data_table.Rd | 4 ++-- man/tm_file_viewer.Rd | 4 ++-- man/tm_front_page.Rd | 4 ++-- man/tm_g_association.Rd | 4 ++-- man/tm_g_bivariate.Rd | 4 ++-- man/tm_g_distribution.Rd | 4 ++-- man/tm_g_response.Rd | 4 ++-- man/tm_g_scatterplot.Rd | 4 ++-- man/tm_g_scatterplotmatrix.Rd | 4 ++-- man/tm_missing_data.Rd | 4 ++-- man/tm_outliers.Rd | 4 ++-- man/tm_t_crosstable.Rd | 4 ++-- man/tm_variable_browser.Rd | 4 ++-- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/man/tm_a_pca.Rd b/man/tm_a_pca.Rd index 745bcd36e..e01bdbe27 100644 --- a/man/tm_a_pca.Rd +++ b/man/tm_a_pca.Rd @@ -20,8 +20,8 @@ tm_a_pca( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{dat}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Columns used to compute PCA.} diff --git a/man/tm_a_regression.Rd b/man/tm_a_regression.Rd index 8a4182664..a52ea262c 100644 --- a/man/tm_a_regression.Rd +++ b/man/tm_a_regression.Rd @@ -21,8 +21,8 @@ tm_a_regression( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{regressor}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Regressor variables from an incoming dataset with filtering and selecting.} diff --git a/man/tm_data_table.Rd b/man/tm_data_table.Rd index ecd5982f1..bec8cde63 100644 --- a/man/tm_data_table.Rd +++ b/man/tm_data_table.Rd @@ -17,8 +17,8 @@ tm_data_table( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{variables_selected}{(\code{list}) A named list of character vectors of the variables (i.e. columns) which should be initially shown for each dataset. Names of list elements should correspond to the names diff --git a/man/tm_file_viewer.Rd b/man/tm_file_viewer.Rd index c38c5fd15..a1be536fb 100644 --- a/man/tm_file_viewer.Rd +++ b/man/tm_file_viewer.Rd @@ -10,8 +10,8 @@ tm_file_viewer( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{input_path}{optional, (\code{list}) of the input paths to either: specific files of accepted formats, a directory or a URL. The paths can be specified as absolute paths or relative to the running diff --git a/man/tm_front_page.Rd b/man/tm_front_page.Rd index 66e17acb0..0efa390d0 100644 --- a/man/tm_front_page.Rd +++ b/man/tm_front_page.Rd @@ -14,8 +14,8 @@ tm_front_page( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{header_text}{\verb{character vector} text to be shown at the top of the module, for each element, if named the name is shown first in bold as a header followed by the value. The first diff --git a/man/tm_g_association.Rd b/man/tm_g_association.Rd index 7cbc13945..321d1d175 100644 --- a/man/tm_g_association.Rd +++ b/man/tm_g_association.Rd @@ -21,8 +21,8 @@ tm_g_association( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{ref}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) reference variable, must set \code{multiple = FALSE}.} diff --git a/man/tm_g_bivariate.Rd b/man/tm_g_bivariate.Rd index 82e6bf9b5..12a90c52f 100644 --- a/man/tm_g_bivariate.Rd +++ b/man/tm_g_bivariate.Rd @@ -29,8 +29,8 @@ tm_g_bivariate( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{x}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Variable names selected to plot along the x-axis by default. Variable can be numeric, factor or character. diff --git a/man/tm_g_distribution.Rd b/man/tm_g_distribution.Rd index 676140a02..a82403274 100644 --- a/man/tm_g_distribution.Rd +++ b/man/tm_g_distribution.Rd @@ -20,8 +20,8 @@ tm_g_distribution( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{dist_var}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Variable to consider for the distribution analysis.} diff --git a/man/tm_g_response.Rd b/man/tm_g_response.Rd index ed92b2148..6d0986c2f 100644 --- a/man/tm_g_response.Rd +++ b/man/tm_g_response.Rd @@ -23,8 +23,8 @@ tm_g_response( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{response}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Which variable to use as the response. You can define one fixed column by using the diff --git a/man/tm_g_scatterplot.Rd b/man/tm_g_scatterplot.Rd index bd9873661..1c742cac2 100644 --- a/man/tm_g_scatterplot.Rd +++ b/man/tm_g_scatterplot.Rd @@ -27,8 +27,8 @@ tm_g_scatterplot( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{x}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Variable names selected to plot along the x-axis by default.} diff --git a/man/tm_g_scatterplotmatrix.Rd b/man/tm_g_scatterplotmatrix.Rd index 202ea0583..0bc3b8782 100644 --- a/man/tm_g_scatterplotmatrix.Rd +++ b/man/tm_g_scatterplotmatrix.Rd @@ -14,8 +14,8 @@ tm_g_scatterplotmatrix( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{variables}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Plotting variables from an incoming dataset with filtering and selecting. In case of diff --git a/man/tm_missing_data.Rd b/man/tm_missing_data.Rd index 8d7edacdb..c8cc46e2e 100644 --- a/man/tm_missing_data.Rd +++ b/man/tm_missing_data.Rd @@ -18,8 +18,8 @@ tm_missing_data( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} for a slider encoding the plot height.} diff --git a/man/tm_outliers.Rd b/man/tm_outliers.Rd index e10085814..8c140e81d 100644 --- a/man/tm_outliers.Rd +++ b/man/tm_outliers.Rd @@ -17,8 +17,8 @@ tm_outliers( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{outlier_var}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) variable to consider for the outliers analysis.} diff --git a/man/tm_t_crosstable.Rd b/man/tm_t_crosstable.Rd index b17bb2f94..d7cf28179 100644 --- a/man/tm_t_crosstable.Rd +++ b/man/tm_t_crosstable.Rd @@ -16,8 +16,8 @@ tm_t_crosstable( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{x}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Object with all available choices with pre-selected option for variable X - row values. In case diff --git a/man/tm_variable_browser.Rd b/man/tm_variable_browser.Rd index 511b8ee99..5b12bd007 100644 --- a/man/tm_variable_browser.Rd +++ b/man/tm_variable_browser.Rd @@ -20,8 +20,8 @@ tm_variable_browser( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{datasets_selected}{(\code{character}) A vector of datasets which should be shown and in what order. Names in the vector have to correspond with datasets names. From 7cc7bebbb52602e64d7f2f02d58fab93839cd4a0 Mon Sep 17 00:00:00 2001 From: vedhav Date: Thu, 15 Feb 2024 03:20:12 +0530 Subject: [PATCH 6/9] chore: fix typo and ci --- R/tm_g_association.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tm_g_association.R b/R/tm_g_association.R index ec7688372..06ee12ff6 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -185,7 +185,7 @@ ui_tm_g_association <- function(id, ...) { selectInput( inputId = ns("association_theme"), label = "Association theme (by ggplot):", - choices = ggplot_themess, + choices = ggplot_themes, selected = args$association_theme, multiple = FALSE ) From dee59a44b25b81ff50789ed8a8e8a9e2e2eb3c5b Mon Sep 17 00:00:00 2001 From: Aleksander Chlebowski Date: Thu, 15 Feb 2024 08:25:01 +0100 Subject: [PATCH 7/9] amend documentation after installing core pkgs from CRAN --- man/tm_a_pca.Rd | 4 ++-- man/tm_a_regression.Rd | 4 ++-- man/tm_data_table.Rd | 4 ++-- man/tm_file_viewer.Rd | 4 ++-- man/tm_front_page.Rd | 4 ++-- man/tm_g_association.Rd | 4 ++-- man/tm_g_bivariate.Rd | 4 ++-- man/tm_g_distribution.Rd | 4 ++-- man/tm_g_response.Rd | 4 ++-- man/tm_g_scatterplot.Rd | 4 ++-- man/tm_g_scatterplotmatrix.Rd | 4 ++-- man/tm_missing_data.Rd | 4 ++-- man/tm_outliers.Rd | 4 ++-- man/tm_t_crosstable.Rd | 4 ++-- man/tm_variable_browser.Rd | 4 ++-- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/man/tm_a_pca.Rd b/man/tm_a_pca.Rd index 745bcd36e..e01bdbe27 100644 --- a/man/tm_a_pca.Rd +++ b/man/tm_a_pca.Rd @@ -20,8 +20,8 @@ tm_a_pca( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{dat}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Columns used to compute PCA.} diff --git a/man/tm_a_regression.Rd b/man/tm_a_regression.Rd index 8a4182664..a52ea262c 100644 --- a/man/tm_a_regression.Rd +++ b/man/tm_a_regression.Rd @@ -21,8 +21,8 @@ tm_a_regression( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{regressor}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Regressor variables from an incoming dataset with filtering and selecting.} diff --git a/man/tm_data_table.Rd b/man/tm_data_table.Rd index ecd5982f1..bec8cde63 100644 --- a/man/tm_data_table.Rd +++ b/man/tm_data_table.Rd @@ -17,8 +17,8 @@ tm_data_table( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{variables_selected}{(\code{list}) A named list of character vectors of the variables (i.e. columns) which should be initially shown for each dataset. Names of list elements should correspond to the names diff --git a/man/tm_file_viewer.Rd b/man/tm_file_viewer.Rd index c38c5fd15..a1be536fb 100644 --- a/man/tm_file_viewer.Rd +++ b/man/tm_file_viewer.Rd @@ -10,8 +10,8 @@ tm_file_viewer( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{input_path}{optional, (\code{list}) of the input paths to either: specific files of accepted formats, a directory or a URL. The paths can be specified as absolute paths or relative to the running diff --git a/man/tm_front_page.Rd b/man/tm_front_page.Rd index 66e17acb0..0efa390d0 100644 --- a/man/tm_front_page.Rd +++ b/man/tm_front_page.Rd @@ -14,8 +14,8 @@ tm_front_page( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{header_text}{\verb{character vector} text to be shown at the top of the module, for each element, if named the name is shown first in bold as a header followed by the value. The first diff --git a/man/tm_g_association.Rd b/man/tm_g_association.Rd index 7cbc13945..321d1d175 100644 --- a/man/tm_g_association.Rd +++ b/man/tm_g_association.Rd @@ -21,8 +21,8 @@ tm_g_association( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{ref}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) reference variable, must set \code{multiple = FALSE}.} diff --git a/man/tm_g_bivariate.Rd b/man/tm_g_bivariate.Rd index 82e6bf9b5..12a90c52f 100644 --- a/man/tm_g_bivariate.Rd +++ b/man/tm_g_bivariate.Rd @@ -29,8 +29,8 @@ tm_g_bivariate( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{x}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Variable names selected to plot along the x-axis by default. Variable can be numeric, factor or character. diff --git a/man/tm_g_distribution.Rd b/man/tm_g_distribution.Rd index 676140a02..a82403274 100644 --- a/man/tm_g_distribution.Rd +++ b/man/tm_g_distribution.Rd @@ -20,8 +20,8 @@ tm_g_distribution( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{dist_var}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Variable to consider for the distribution analysis.} diff --git a/man/tm_g_response.Rd b/man/tm_g_response.Rd index ed92b2148..6d0986c2f 100644 --- a/man/tm_g_response.Rd +++ b/man/tm_g_response.Rd @@ -23,8 +23,8 @@ tm_g_response( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{response}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Which variable to use as the response. You can define one fixed column by using the diff --git a/man/tm_g_scatterplot.Rd b/man/tm_g_scatterplot.Rd index bd9873661..1c742cac2 100644 --- a/man/tm_g_scatterplot.Rd +++ b/man/tm_g_scatterplot.Rd @@ -27,8 +27,8 @@ tm_g_scatterplot( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{x}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Variable names selected to plot along the x-axis by default.} diff --git a/man/tm_g_scatterplotmatrix.Rd b/man/tm_g_scatterplotmatrix.Rd index 202ea0583..0bc3b8782 100644 --- a/man/tm_g_scatterplotmatrix.Rd +++ b/man/tm_g_scatterplotmatrix.Rd @@ -14,8 +14,8 @@ tm_g_scatterplotmatrix( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{variables}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Plotting variables from an incoming dataset with filtering and selecting. In case of diff --git a/man/tm_missing_data.Rd b/man/tm_missing_data.Rd index 8d7edacdb..c8cc46e2e 100644 --- a/man/tm_missing_data.Rd +++ b/man/tm_missing_data.Rd @@ -18,8 +18,8 @@ tm_missing_data( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} for a slider encoding the plot height.} diff --git a/man/tm_outliers.Rd b/man/tm_outliers.Rd index e10085814..8c140e81d 100644 --- a/man/tm_outliers.Rd +++ b/man/tm_outliers.Rd @@ -17,8 +17,8 @@ tm_outliers( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{outlier_var}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) variable to consider for the outliers analysis.} diff --git a/man/tm_t_crosstable.Rd b/man/tm_t_crosstable.Rd index b17bb2f94..d7cf28179 100644 --- a/man/tm_t_crosstable.Rd +++ b/man/tm_t_crosstable.Rd @@ -16,8 +16,8 @@ tm_t_crosstable( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{x}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Object with all available choices with pre-selected option for variable X - row values. In case diff --git a/man/tm_variable_browser.Rd b/man/tm_variable_browser.Rd index 511b8ee99..5b12bd007 100644 --- a/man/tm_variable_browser.Rd +++ b/man/tm_variable_browser.Rd @@ -20,8 +20,8 @@ tm_variable_browser( ) } \arguments{ -\item{label}{(\code{character(1)}) Label shown in the navigation item for the module. Any label possible except -\code{"global_filters"} - read more in \code{mapping} argument of \code{\link[teal:teal_slices]{teal_slices()}}.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{datasets_selected}{(\code{character}) A vector of datasets which should be shown and in what order. Names in the vector have to correspond with datasets names. From 304ca86b07a23b1e096a5d1fa6603cab65180762 Mon Sep 17 00:00:00 2001 From: Aleksander Chlebowski Date: Thu, 15 Feb 2024 15:39:36 +0100 Subject: [PATCH 8/9] specify linters --- R/tm_a_pca.R | 2 +- R/tm_g_association.R | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 60ff4756a..1a9e69680 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -710,7 +710,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl dev_labs <- list(color = varname_w_label(resp_col, ANL)) scales_biplot <- - if (is.character(response) || is.factor(response) || (is.numeric(response) && length(unique(response)) <= 6)) { # nolint + if (is.character(response) || is.factor(response) || (is.numeric(response) && length(unique(response)) <= 6)) { # nolint line_length_linter qenv <- teal.code::eval_code( qenv, quote(pca_rot$response <- as.factor(response)) diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 06ee12ff6..0a91f526a 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -74,8 +74,8 @@ tm_g_association <- function(label = "Association", show_association = TRUE, plot_height = c(600, 400, 5000), plot_width = NULL, - distribution_theme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), # nolint - association_theme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), # nolint + distribution_theme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), # nolint line_length_linter + association_theme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"), # nolint line_length_linter pre_output = NULL, post_output = NULL, ggplot2_args = teal.widgets::ggplot2_args()) { From c99a900b3bb9fa10c9d4d8e30c0cc5003c25c95c Mon Sep 17 00:00:00 2001 From: Aleksander Chlebowski Date: Thu, 15 Feb 2024 16:11:21 +0100 Subject: [PATCH 9/9] specify and clean up linters --- R/tm_a_pca.R | 51 +++++++++++++++----------------- R/tm_a_regression.R | 10 +++---- R/tm_data_table.R | 2 +- R/tm_g_association.R | 4 +-- R/tm_g_bivariate.R | 6 ++-- R/tm_g_distribution.R | 10 +++---- R/tm_g_response.R | 18 ++++++------ R/tm_g_scatterplot.R | 26 ++++++++--------- R/tm_g_scatterplotmatrix.R | 20 ++++++------- R/tm_missing_data.R | 18 ++++++------ R/tm_outliers.R | 60 +++++++++++++++++++------------------- R/tm_t_crosstable.R | 8 ++--- R/tm_variable_browser.R | 22 +++++++------- R/zzz.R | 2 +- data-raw/data.R | 10 +++---- 15 files changed, 132 insertions(+), 135 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 1a9e69680..c1fda7608 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -343,9 +343,9 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl keep_cols <- as.character(merged$anl_input_r()$columns_source$dat) na_action <- input$na_action standardization <- input$standardization - center <- standardization %in% c("center", "center_scale") # nolint + center <- standardization %in% c("center", "center_scale") scale <- standardization == "center_scale" - ANL <- merged$anl_q_r()[["ANL"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter teal::validate_has_data(ANL, 10) validate(need( @@ -374,9 +374,9 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl keep_cols <- as.character(merged$anl_input_r()$columns_source$dat) na_action <- input$na_action standardization <- input$standardization - center <- standardization %in% c("center", "center_scale") # nolint + center <- standardization %in% c("center", "center_scale") scale <- standardization == "center_scale" - ANL <- merged$anl_q_r()[["ANL"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter qenv <- teal.code::eval_code( merged$anl_q_r(), @@ -389,7 +389,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl if (na_action == "drop") { qenv <- teal.code::eval_code( qenv, - quote(ANL <- tidyr::drop_na(ANL, keep_columns)) # nolint + quote(ANL <- tidyr::drop_na(ANL, keep_columns)) # nolint object_name_linter ) } @@ -461,8 +461,8 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl # plot elbow ---- plot_elbow <- function(base_q) { ggtheme <- input$ggtheme - rotate_xaxis_labels <- input$rotate_xaxis_labels # nolint - font_size <- input$font_size # nolint + rotate_xaxis_labels <- input$rotate_xaxis_labels + font_size <- input$font_size angle_value <- ifelse(isTRUE(rotate_xaxis_labels), 45, 0) hjust_value <- ifelse(isTRUE(rotate_xaxis_labels), 1, 0.5) @@ -536,13 +536,13 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl # plot circle ---- plot_circle <- function(base_q) { - x_axis <- input$x_axis # nolint - y_axis <- input$y_axis # nolint - variables <- input$variables # nolint + x_axis <- input$x_axis + y_axis <- input$y_axis + variables <- input$variables ggtheme <- input$ggtheme - rotate_xaxis_labels <- input$rotate_xaxis_labels # nolint - font_size <- input$font_size # nolint + rotate_xaxis_labels <- input$rotate_xaxis_labels + font_size <- input$font_size angle <- ifelse(isTRUE(rotate_xaxis_labels), 45, 0) hjust <- ifelse(isTRUE(rotate_xaxis_labels), 1, 0.5) @@ -611,21 +611,21 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl plot_biplot <- function(base_q) { qenv <- base_q - ANL <- qenv[["ANL"]] # nolint + ANL <- qenv[["ANL"]] # nolint object_name_linter resp_col <- as.character(merged$anl_input_r()$columns_source$response) dat_cols <- as.character(merged$anl_input_r()$columns_source$dat) - x_axis <- input$x_axis # nolint - y_axis <- input$y_axis # nolint - variables <- input$variables # nolint + x_axis <- input$x_axis + y_axis <- input$y_axis + variables <- input$variables pca <- qenv[["pca"]] ggtheme <- input$ggtheme - rotate_xaxis_labels <- input$rotate_xaxis_labels # nolint - alpha <- input$alpha # nolint - size <- input$size # nolint - font_size <- input$font_size # nolint + rotate_xaxis_labels <- input$rotate_xaxis_labels + alpha <- input$alpha + size <- input$size + font_size <- input$font_size qenv <- teal.code::eval_code( qenv, @@ -690,10 +690,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl ) dev_labs <- list() } else { - rp_keys <- setdiff( - colnames(ANL), - as.character(unlist(merged$anl_input_r()$columns_source)) - ) # nolint + rp_keys <- setdiff(colnames(ANL), as.character(unlist(merged$anl_input_r()$columns_source))) response <- ANL[[resp_col]] @@ -825,11 +822,11 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl # plot pc_var ---- plot_pc_var <- function(base_q) { - pc <- input$pc # nolint + pc <- input$pc ggtheme <- input$ggtheme - rotate_xaxis_labels <- input$rotate_xaxis_labels # nolint - font_size <- input$font_size # nolint + rotate_xaxis_labels <- input$rotate_xaxis_labels + font_size <- input$font_size angle <- ifelse(rotate_xaxis_labels, 45, 0) hjust <- ifelse(rotate_xaxis_labels, 1, 0.5) diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index e4fdd1ddc..af146d997 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -312,7 +312,7 @@ srv_a_regression <- function(id, # sets qenv object and populates it with data merge call and fit expression fit_r <- reactive({ - ANL <- anl_merged_q()[["ANL"]] # nolint + ANL <- anl_merged_q()[["ANL"]] # nolint object_name_linter teal::validate_has_data(ANL, 10) validate(need(is.numeric(ANL[regression_var()$response][[1]]), "Response variable should be numeric.")) @@ -399,9 +399,9 @@ srv_a_regression <- function(id, }) output_q <- reactive({ - alpha <- input$alpha # nolint - size <- input$size # nolint - ggtheme <- input$ggtheme # nolint + alpha <- input$alpha + size <- input$size + ggtheme <- input$ggtheme input_type <- input$plot_type show_outlier <- input$show_outlier @@ -409,7 +409,7 @@ srv_a_regression <- function(id, plot_type_0 <- function() { fit <- fit_r()[["fit"]] - ANL <- anl_merged_q()[["ANL"]] # nolint + ANL <- anl_merged_q()[["ANL"]] # nolint object_name_linter stopifnot(ncol(fit$model) == 2) diff --git a/R/tm_data_table.R b/R/tm_data_table.R index ad20cc078..29adb0212 100644 --- a/R/tm_data_table.R +++ b/R/tm_data_table.R @@ -282,7 +282,7 @@ srv_data_table <- function(id, dt_args$options <- dt_options if (!is.null(input$dt_rows)) { - dt_args$options$pageLength <- input$dt_rows # nolint + dt_args$options$pageLength <- input$dt_rows } dt_args$data <- dataframe_selected diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 0a91f526a..da605728b 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -258,7 +258,7 @@ srv_tm_g_association <- function(id, output_q <- reactive({ teal::validate_inputs(iv_r()) - ANL <- merged$anl_q_r()[["ANL"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter teal::validate_has_data(ANL, 3) vars_names <- merged$anl_input_r()$columns_source$vars @@ -276,7 +276,7 @@ srv_tm_g_association <- function(id, if (is_scatterplot) { shinyjs::show("alpha") shinyjs::show("size") - alpha <- input$alpha # nolint + alpha <- input$alpha size <- input$size } else { shinyjs::hide("alpha") diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index 2a1ddd072..39f95e05e 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -458,7 +458,7 @@ srv_g_bivariate <- function(id, output_q <- reactive({ teal::validate_inputs(iv_r()) - ANL <- merged$anl_q_r()[["ANL"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter teal::validate_has_data(ANL, 3) x_col_vec <- as.vector(merged$anl_input_r()$columns_source$x) @@ -496,7 +496,7 @@ srv_g_bivariate <- function(id, if (is_scatterplot) { shinyjs::show("alpha") - alpha <- input$alpha # nolint + alpha <- input$alpha shinyjs::show("add_lines") if (color_settings && input$coloring) { @@ -585,7 +585,7 @@ srv_g_bivariate <- function(id, substitute( expr = { # Add facetting labels - # optional: grid.newpage() #nolintr + # optional: grid.newpage() # nolint commented_code_linter p <- add_facet_labels(p, xfacet_label = nulled_col_facet_name, yfacet_label = nulled_row_facet_name) grid::grid.newpage() grid::grid.draw(p) diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 72d9f0f52..d42cbf535 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -493,7 +493,7 @@ srv_distribution <- function(id, ) } - ANL <- merged$anl_q_r()[[as.character(dist_var[[1]]$dataname)]] # nolint + ANL <- merged$anl_q_r()[[as.character(dist_var[[1]]$dataname)]] # nolint object_name_linter params <- get_dist_params(as.numeric(stats::na.omit(ANL[[dist_var2]])), input$t_dist) params_vec <- round(unname(unlist(params)), 2) params_names <- names(params) @@ -533,7 +533,7 @@ srv_distribution <- function(id, common_q <- reactive({ # Create a private stack for this function only. - ANL <- merged$anl_q_r()[["ANL"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter dist_var <- merge_vars()$dist_var s_var <- merge_vars()$s_var g_var <- merge_vars()$g_var @@ -560,7 +560,7 @@ srv_distribution <- function(id, qenv <- teal.code::eval_code( qenv, substitute( - expr = ANL[[g_var]] <- forcats::fct_na_value_to_level(as.factor(ANL[[g_var]]), "NA"), # nolint + expr = ANL[[g_var]] <- forcats::fct_na_value_to_level(as.factor(ANL[[g_var]]), "NA"), # nolint object_name_linter env = list(g_var = g_var) ) ) @@ -576,7 +576,7 @@ srv_distribution <- function(id, qenv <- teal.code::eval_code( qenv, substitute( - expr = ANL[[s_var]] <- forcats::fct_na_value_to_level(as.factor(ANL[[s_var]]), "NA"), # nolint + expr = ANL[[s_var]] <- forcats::fct_na_value_to_level(as.factor(ANL[[s_var]]), "NA"), # nolint object_name_linter env = list(s_var = s_var) ) ) @@ -994,7 +994,7 @@ srv_distribution <- function(id, }, valueExpr = { # Create a private stack for this function only. - ANL <- common_q()[["ANL"]] # nolint + ANL <- common_q()[["ANL"]] # nolint object_name_linter dist_var <- merge_vars()$dist_var s_var <- merge_vars()$s_var diff --git a/R/tm_g_response.R b/R/tm_g_response.R index 8c3d96596..754433d3a 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -295,7 +295,7 @@ srv_g_response <- function(id, teal::validate_inputs(iv_r()) qenv <- merged$anl_q_r() - ANL <- qenv[["ANL"]] # nolint + ANL <- qenv[["ANL"]] # nolint object_name_linter resp_var <- as.vector(merged$anl_input_r()$columns_source$response) x <- as.vector(merged$anl_input_r()$columns_source$x) @@ -321,18 +321,18 @@ srv_g_response <- function(id, rotate_xaxis_labels <- input$rotate_xaxis_labels ggtheme <- input$ggtheme - arg_position <- if (freq) "stack" else "fill" # nolint + arg_position <- if (freq) "stack" else "fill" - rowf <- if (length(row_facet_name) == 0) NULL else as.name(row_facet_name) # nolint - colf <- if (length(col_facet_name) == 0) NULL else as.name(col_facet_name) # nolint - resp_cl <- as.name(resp_var) # nolint - x_cl <- as.name(x) # nolint + rowf <- if (length(row_facet_name) != 0) as.name(row_facet_name) + colf <- if (length(col_facet_name) != 0) as.name(col_facet_name) + resp_cl <- as.name(resp_var) + x_cl <- as.name(x) if (swap_axes) { qenv <- teal.code::eval_code( qenv, substitute( - expr = ANL[[x]] <- with(ANL, forcats::fct_rev(x_cl)), # nolint + expr = ANL[[x]] <- with(ANL, forcats::fct_rev(x_cl)), # nolint object_name_linter env = list(x = x, x_cl = x_cl) ) ) @@ -341,7 +341,7 @@ srv_g_response <- function(id, qenv <- teal.code::eval_code( qenv, substitute( - expr = ANL[[resp_var]] <- factor(ANL[[resp_var]]), # nolint + expr = ANL[[resp_var]] <- factor(ANL[[resp_var]]), # nolint object_name_linter env = list(resp_var = resp_var) ) ) %>% @@ -430,7 +430,7 @@ srv_g_response <- function(id, ) if (rotate_xaxis_labels) { - dev_ggplot2_args$theme[["axis.text.x"]] <- quote(element_text(angle = 45, hjust = 1)) # nolint + dev_ggplot2_args$theme[["axis.text.x"]] <- quote(element_text(angle = 45, hjust = 1)) } all_ggplot2_args <- teal.widgets::resolve_ggplot2_args( diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index 984a50b62..1cf20b3d8 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -485,7 +485,7 @@ srv_g_scatterplot <- function(id, ) trend_line_is_applicable <- reactive({ - ANL <- merged$anl_q_r()[["ANL"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter x_var <- as.vector(merged$anl_input_r()$columns_source$x) y_var <- as.vector(merged$anl_input_r()$columns_source$y) length(x_var) > 0 && length(y_var) > 0 && is.numeric(ANL[[x_var]]) && is.numeric(ANL[[y_var]]) @@ -512,7 +512,7 @@ srv_g_scatterplot <- function(id, output$num_na_removed <- renderUI({ if (add_trend_line()) { - ANL <- merged$anl_q_r()[["ANL"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter x_var <- as.vector(merged$anl_input_r()$columns_source$x) y_var <- as.vector(merged$anl_input_r()$columns_source$y) if ((num_total_na <- nrow(ANL) - nrow(stats::na.omit(ANL[, c(x_var, y_var)]))) > 0) { @@ -536,7 +536,7 @@ srv_g_scatterplot <- function(id, output_q <- reactive({ teal::validate_inputs(iv_r(), iv_facet) - ANL <- merged$anl_q_r()[["ANL"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter x_var <- as.vector(merged$anl_input_r()$columns_source$x) y_var <- as.vector(merged$anl_input_r()$columns_source$y) @@ -552,16 +552,16 @@ srv_g_scatterplot <- function(id, } else { as.vector(merged$anl_input_r()$columns_source$col_facet) } - alpha <- input$alpha # nolint - size <- input$size # nolint - rotate_xaxis_labels <- input$rotate_xaxis_labels # nolint + alpha <- input$alpha + size <- input$size + rotate_xaxis_labels <- input$rotate_xaxis_labels add_density <- input$add_density ggtheme <- input$ggtheme rug_plot <- input$rug_plot - color <- input$color # nolint - shape <- `if`(is.null(input$shape) || identical(input$shape, ""), "circle", input$shape) # nolint + color <- input$color + shape <- `if`(is.null(input$shape) || identical(input$shape, ""), "circle", input$shape) smoothing_degree <- as.integer(input$smoothing_degree) - ci <- input$ci # nolint + ci <- input$ci log_x <- input$log_x log_y <- input$log_y @@ -637,7 +637,7 @@ srv_g_scatterplot <- function(id, plot_q <- teal.code::eval_code( object = plot_q, code = substitute( - expr = ANL[, log_x_var] <- log_x_fn(ANL[, x_var]), # nolint + expr = ANL[, log_x_var] <- log_x_fn(ANL[, x_var]), # nolint object_name_linter env = list( x_var = x_var, log_x_fn = as.name(log_x_fn), @@ -652,7 +652,7 @@ srv_g_scatterplot <- function(id, plot_q <- teal.code::eval_code( object = plot_q, code = substitute( - expr = ANL[, log_y_var] <- log_y_fn(ANL[, y_var]), # nolint + expr = ANL[, log_y_var] <- log_y_fn(ANL[, y_var]), # nolint object_name_linter env = list( y_var = y_var, log_y_fn = as.name(log_y_fn), @@ -785,7 +785,7 @@ srv_g_scatterplot <- function(id, plot_q <- teal.code::eval_code( plot_q, substitute( - expr = ANL <- dplyr::filter(ANL, !is.na(x_var) & !is.na(y_var)), # nolint + expr = ANL <- dplyr::filter(ANL, !is.na(x_var) & !is.na(y_var)), # nolint object_name_linter env = list(x_var = as.name(x_var), y_var = as.name(y_var)) ) ) @@ -847,7 +847,7 @@ srv_g_scatterplot <- function(id, ) if (rotate_xaxis_labels) { - dev_ggplot2_args$theme[["axis.text.x"]] <- quote(element_text(angle = 45, hjust = 1)) # nolint + dev_ggplot2_args$theme[["axis.text.x"]] <- quote(element_text(angle = 45, hjust = 1)) } all_ggplot2_args <- teal.widgets::resolve_ggplot2_args( diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index f7c26eddf..f4437161c 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -200,14 +200,14 @@ srv_g_scatterplotmatrix <- function(id, data, reporter, filter_panel_api, variab teal::validate_inputs(iv_r()) qenv <- merged$anl_q_r() - ANL <- qenv[["ANL"]] # nolint + ANL <- qenv[["ANL"]] # nolint object_name_linter cols_names <- merged$anl_input_r()$columns_source$variables - alpha <- input$alpha # nolint - cex <- input$cex # nolint - add_cor <- input$cor # nolint - cor_method <- input$cor_method # nolint - cor_na_omit <- input$cor_na_omit # nolint + alpha <- input$alpha + cex <- input$cex + add_cor <- input$cor + cor_method <- input$cor_method + cor_na_omit <- input$cor_na_omit cor_na_action <- if (isTruthy(cor_na_omit)) { "na.omit" @@ -219,7 +219,7 @@ srv_g_scatterplotmatrix <- function(id, data, reporter, filter_panel_api, variab teal::validate_has_data(ANL[, cols_names, drop = FALSE], 10, complete = TRUE, allow_inf = FALSE) # get labels and proper variable names - varnames <- varname_w_label(cols_names, ANL, wrap_width = 20) # nolint + varnames <- varname_w_label(cols_names, ANL, wrap_width = 20) # check character columns. If any, then those are converted to factors check_char <- vapply(ANL[, cols_names], is.character, logical(1)) @@ -227,7 +227,7 @@ srv_g_scatterplotmatrix <- function(id, data, reporter, filter_panel_api, variab qenv <- teal.code::eval_code( qenv, substitute( - expr = ANL <- ANL[, cols_names] %>% # nolint + expr = ANL <- ANL[, cols_names] %>% # nolint object_name_linter dplyr::mutate_if(is.character, as.factor) %>% droplevels(), env = list(cols_names = cols_names) @@ -237,7 +237,7 @@ srv_g_scatterplotmatrix <- function(id, data, reporter, filter_panel_api, variab qenv <- teal.code::eval_code( qenv, substitute( - expr = ANL <- ANL[, cols_names] %>% # nolint + expr = ANL <- ANL[, cols_names] %>% # nolint object_name_linter droplevels(), env = list(cols_names = cols_names) ) @@ -322,7 +322,7 @@ srv_g_scatterplotmatrix <- function(id, data, reporter, filter_panel_api, variab output$message <- renderText({ shiny::req(iv_r()$is_valid()) req(selector_list()$variables()) - ANL <- merged$anl_q_r()[["ANL"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter cols_names <- unique(unname(do.call(c, merged$anl_input_r()$columns_source))) check_char <- vapply(ANL[, cols_names], is.character, logical(1)) if (any(check_char)) { diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index 8f66fe2a4..60a8f33f4 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -425,14 +425,14 @@ srv_missing_data <- function(id, data, reporter, filter_panel_api, dataname, par teal.code::eval_code( data(), substitute( - expr = ANL <- anl_name[, selected_vars, drop = FALSE], # nolint + expr = ANL <- anl_name[, selected_vars, drop = FALSE], # nolint object_name_linter env = list(anl_name = as.name(dataname), selected_vars = selected_vars()) ) ) } else { teal.code::eval_code( data(), - substitute(expr = ANL <- anl_name, env = list(anl_name = as.name(dataname))) # nolint + substitute(expr = ANL <- anl_name, env = list(anl_name = as.name(dataname))) # nolint object_name_linter ) } @@ -440,13 +440,13 @@ srv_missing_data <- function(id, data, reporter, filter_panel_api, dataname, par qenv <- teal.code::eval_code( qenv, substitute( - expr = ANL[[group_var]] <- anl_name[[group_var]], # nolint + expr = ANL[[group_var]] <- anl_name[[group_var]], # nolint object_name_linter env = list(group_var = group_var, anl_name = as.name(dataname)) ) ) } - new_col_name <- "**anyna**" # nolint variable assigned and used + new_col_name <- "**anyna**" qenv <- teal.code::eval_code( qenv, @@ -586,11 +586,11 @@ srv_missing_data <- function(id, data, reporter, filter_panel_api, dataname, par qenv <- common_code_q() if (input$any_na) { - new_col_name <- "**anyna**" # nolint (local variable is assigned and used) + new_col_name <- "**anyna**" qenv <- teal.code::eval_code( qenv, substitute( - expr = ANL[[new_col_name]] <- ifelse(rowSums(is.na(ANL)) > 0, NA, FALSE), # nolint + expr = ANL[[new_col_name]] <- ifelse(rowSums(is.na(ANL)) > 0, NA, FALSE), # nolint object_name_linter env = list(new_col_name = new_col_name) ) ) @@ -975,13 +975,13 @@ srv_missing_data <- function(id, data, reporter, filter_panel_api, dataname, par ) ) - group_vals <- input$group_by_vals # nolint (local variable is assigned and used) + group_vals <- input$group_by_vals variables_select <- input$variables_select vars <- unique(variables_select, group_var) - count_type <- input$count_type # nolint (local variable is assigned and used) + count_type <- input$count_type if (!is.null(selected_vars()) && length(selected_vars()) != ncol(anl)) { - variables <- selected_vars() # nolint (local variable is assigned and used) + variables <- selected_vars() } else { variables <- colnames(anl) } diff --git a/R/tm_outliers.R b/R/tm_outliers.R index fd7c3f8f3..40b3c728d 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -311,7 +311,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, n_outlier_missing <- reactive({ shiny::req(iv_r()$is_valid()) outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var) - ANL <- merged$anl_q_r()[["ANL"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter sum(is.na(ANL[[outlier_var]])) }) @@ -321,12 +321,12 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, common_code_q <- reactive({ shiny::req(iv_r()$is_valid()) - ANL <- merged$anl_q_r()[["ANL"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter qenv <- merged$anl_q_r() outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var) categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) - order_by_outlier <- input$order_by_outlier # nolint + order_by_outlier <- input$order_by_outlier method <- input$method split_outliers <- input$split_outliers teal::validate_has_data( @@ -350,7 +350,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, qenv <- teal.code::eval_code( qenv, substitute( - expr = ANL <- ANL %>% dplyr::filter(!is.na(outlier_var_name)), # nolint + expr = ANL <- ANL %>% dplyr::filter(!is.na(outlier_var_name)), # nolint object_name_linter env = list(outlier_var_name = as.name(outlier_var)) ) ) @@ -367,7 +367,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, qenv <- teal.code::eval_code( qenv, substitute( - expr = ANL <- ANL %>% dplyr::filter(!is.na(outlier_var_name)), # nolint + expr = ANL <- ANL %>% dplyr::filter(!is.na(outlier_var_name)), # nolint object_name_linter env = list(outlier_var_name = as.name(outlier_var)) ) ) @@ -376,7 +376,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, } # slider - outlier_definition_param <- if (method == "IQR") { # nolint + outlier_definition_param <- if (method == "IQR") { input$iqr_slider } else if (method == "Z-score") { input$zscore_slider @@ -399,7 +399,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, qenv, substitute( expr = { - ANL_OUTLIER <- ANL %>% # nolint + ANL_OUTLIER <- ANL %>% # nolint object_name_linter group_expr %>% # styler: off dplyr::mutate(is_outlier = { q1_q3 <- stats::quantile(outlier_var_name, probs = c(0.25, 0.75)) @@ -544,13 +544,13 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, # In order for geom_rug to work properly when reordering takes place inside facet_grid, # all tables must have the column used for reording. # In this case, the column used for reordering is `order`. - ANL_OUTLIER <- dplyr::left_join( # nolint + ANL_OUTLIER <- dplyr::left_join( # nolint object_name_linter ANL_OUTLIER, summary_table_pre[, c("order", categorical_var)], by = categorical_var ) # so that x axis of plot aligns with columns of summary table, from most outliers to least by percentage - ANL <- ANL %>% # nolint + ANL <- ANL %>% # nolint object_name_linter dplyr::left_join( dplyr::select(summary_table_pre, categorical_var_name, order), by = categorical_var @@ -602,11 +602,11 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, } ) - # boxplot/violinplot #nolint + # boxplot/violinplot # nolint commented_code_linter boxplot_q <- reactive({ req(common_code_q()) - ANL <- common_code_q()[["ANL"]] # nolint - ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] # nolint + ANL <- common_code_q()[["ANL"]] # nolint object_name_linter + ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] # nolint object_name_linter outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var) categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) @@ -615,7 +615,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, teal::validate_has_data(ANL, 1) # boxplot - plot_call <- quote(ANL %>% ggplot()) # nolint + plot_call <- quote(ANL %>% ggplot()) plot_call <- if (input$boxplot_alts == "Box plot") { substitute(expr = plot_call + geom_boxplot(outlier.shape = NA), env = list(plot_call = plot_call)) @@ -697,8 +697,8 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, # density plot density_plot_q <- reactive({ - ANL <- common_code_q()[["ANL"]] # nolint - ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] # nolint + ANL <- common_code_q()[["ANL"]] # nolint object_name_linter + ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] # nolint object_name_linter outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var) categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) @@ -757,8 +757,8 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, # Cumulative distribution plot cumulative_plot_q <- reactive({ - ANL <- common_code_q()[["ANL"]] # nolint - ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] # nolint + ANL <- common_code_q()[["ANL"]] # nolint object_name_linter + ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] # nolint object_name_linter qenv <- common_code_q() @@ -802,7 +802,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, all_categories <- lapply( unique(ANL[[categorical_var]]), function(x) { - ANL <- ANL %>% dplyr::filter(get(categorical_var) == x) # nolint + ANL <- ANL %>% dplyr::filter(get(categorical_var) == x) # nolint object_name_linter anl_outlier2 <- ANL_OUTLIER %>% dplyr::filter(get(categorical_var) == x) ecdf_df <- ANL %>% dplyr::mutate(y = stats::ecdf(ANL[[outlier_var]])(ANL[[outlier_var]])) @@ -979,7 +979,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, choices <- teal.transform::variable_choices(data()[[dataname_first]]) observeEvent(common_code_q(), { - ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] # nolint + ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] # nolint object_name_linter teal.widgets::updateOptionalSelectInput( session, inputId = "table_ui_columns", @@ -995,9 +995,9 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var) categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var) - ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] # nolint - ANL_OUTLIER_EXTENDED <- common_code_q()[["ANL_OUTLIER_EXTENDED"]] # nolint - ANL <- common_code_q()[["ANL"]] # nolint + ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] # nolint object_name_linter + ANL_OUTLIER_EXTENDED <- common_code_q()[["ANL_OUTLIER_EXTENDED"]] # nolint object_name_linter + ANL <- common_code_q()[["ANL"]] # nolint object_name_linter plot_brush <- if (tab == "Boxplot") { boxplot_r() box_pws$brush() @@ -1010,7 +1010,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, } # removing unused column ASAP - ANL_OUTLIER$order <- ANL$order <- NULL # nolint + ANL_OUTLIER$order <- ANL$order <- NULL # nolint object_name_linter display_table <- if (!is.null(plot_brush)) { if (length(categorical_var) > 0) { @@ -1026,7 +1026,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, if (tab == "Boxplot") { # in boxplot with no categorical variable, there is no column in ANL that would correspond to x-axis # so a column needs to be inserted with the value "Entire dataset" because that's the label used in plot - ANL[[plot_brush$mapping$x]] <- "Entire dataset" # nolint + ANL[[plot_brush$mapping$x]] <- "Entire dataset" # nolint object_name_linter } } @@ -1038,11 +1038,11 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, } else if (tab == "Cumulative Distribution Plot") { plot_brush$mapping$y <- "cdf" if (length(categorical_var) > 0) { - ANL <- ANL %>% # nolint + ANL <- ANL %>% # nolint object_name_linter dplyr::group_by(!!as.name(plot_brush$mapping$panelvar1)) %>% dplyr::mutate(cdf = stats::ecdf(!!as.name(outlier_var))(!!as.name(outlier_var))) } else { - ANL$cdf <- stats::ecdf(ANL[[outlier_var]])(ANL[[outlier_var]]) # nolint + ANL$cdf <- stats::ecdf(ANL[[outlier_var]])(ANL[[outlier_var]]) # nolint object_name_linter } } @@ -1087,10 +1087,10 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, output$total_outliers <- renderUI({ shiny::req(iv_r()$is_valid()) - ANL <- merged$anl_q_r()[["ANL"]] # nolint - ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter + ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] # nolint object_name_linter teal::validate_has_data(ANL, 1) - ANL_OUTLIER_SELECTED <- ANL_OUTLIER[ANL_OUTLIER$is_outlier_selected, ] # nolint + ANL_OUTLIER_SELECTED <- ANL_OUTLIER[ANL_OUTLIER$is_outlier_selected, ] # nolint object_name_linter h5( sprintf( "%s %d / %d [%.02f%%]", @@ -1104,7 +1104,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, output$total_missing <- renderUI({ if (n_outlier_missing() > 0) { - ANL <- merged$anl_q_r()[["ANL"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter helpText( sprintf( "%s %d / %d [%.02f%%]", diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index 49ba6afd2..4aecdb030 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -233,7 +233,7 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y, output_q <- reactive({ teal::validate_inputs(iv_r()) - ANL <- merged$anl_q_r()[["ANL"]] # nolint + ANL <- merged$anl_q_r()[["ANL"]] # nolint object_name_linter # As this is a summary x_name <- as.vector(merged$anl_input_r()$columns_source$x) @@ -252,8 +252,8 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y, "Selected column variable has an unsupported data type." )) - show_percentage <- input$show_percentage # nolint - show_total <- input$show_total # nolint + show_percentage <- input$show_percentage + show_total <- input$show_total plot_title <- paste( "Cross-Table of", @@ -317,7 +317,7 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y, teal.code::eval_code( substitute( expr = { - ANL <- tern::df_explicit_na(ANL) # nolint + ANL <- tern::df_explicit_na(ANL) # nolint object_name_linter tbl <- rtables::build_table(lyt = lyt, df = ANL[order(ANL[[y_name]]), ]) tbl }, diff --git a/R/tm_variable_browser.R b/R/tm_variable_browser.R index cb46e5db0..a68ff2a0e 100644 --- a/R/tm_variable_browser.R +++ b/R/tm_variable_browser.R @@ -181,7 +181,7 @@ srv_variable_browser <- function(id, .unique_records_for_factor <- 30 # if there are < this number of unique records then a numeric # variable is by default treated as a factor - .unique_records_default_as_factor <- 6 # nolint + .unique_records_default_as_factor <- 6 # nolint object_length_linter datanames <- isolate(teal.data::datanames(data())) datanames <- Filter(function(name) { @@ -231,7 +231,7 @@ srv_variable_browser <- function(id, condition = length(parent_dataname) > 0 && parent_dataname %in% datanames ) - columns_names <- new.env() # nolint + columns_names <- new.env() # plot_var$data holds the name of the currently selected dataset # plot_var$variable[[]] holds the name of the currently selected @@ -547,7 +547,7 @@ create_sparklines <- function(arr, width = 150, ...) { #' @export #' @keywords internal #' @rdname create_sparklines -create_sparklines.default <- function(arr, width = 150, ...) { # nolint +create_sparklines.default <- function(arr, width = 150, ...) { return(as.character(tags$code("unsupported variable type", class = "text-blue"))) } @@ -561,7 +561,7 @@ create_sparklines.default <- function(arr, width = 150, ...) { # nolint #' @export #' @keywords internal #' @rdname create_sparklines -create_sparklines.Date <- function(arr, width = 150, bar_spacing = 5, bar_width = 20, ...) { # nolint +create_sparklines.Date <- function(arr, width = 150, bar_spacing = 5, bar_width = 20, ...) { arr_num <- as.numeric(arr) arr_num <- sort(arr_num, decreasing = FALSE, method = "radix") binwidth <- get_bin_width(arr_num, 1) @@ -601,7 +601,7 @@ create_sparklines.Date <- function(arr, width = 150, bar_spacing = 5, bar_width #' @export #' @keywords internal #' @rdname create_sparklines -create_sparklines.POSIXct <- function(arr, width = 150, bar_spacing = 5, bar_width = 20, ...) { # nolint +create_sparklines.POSIXct <- function(arr, width = 150, bar_spacing = 5, bar_width = 20, ...) { arr_num <- as.numeric(arr) arr_num <- sort(arr_num, decreasing = FALSE, method = "radix") binwidth <- get_bin_width(arr_num, 1) @@ -641,7 +641,7 @@ create_sparklines.POSIXct <- function(arr, width = 150, bar_spacing = 5, bar_wid #' @export #' @keywords internal #' @rdname create_sparklines -create_sparklines.POSIXlt <- function(arr, width = 150, bar_spacing = 5, bar_width = 20, ...) { # nolint +create_sparklines.POSIXlt <- function(arr, width = 150, bar_spacing = 5, bar_width = 20, ...) { arr_num <- as.numeric(arr) arr_num <- sort(arr_num, decreasing = FALSE, method = "radix") binwidth <- get_bin_width(arr_num, 1) @@ -681,7 +681,7 @@ create_sparklines.POSIXlt <- function(arr, width = 150, bar_spacing = 5, bar_wid #' @export #' @keywords internal #' @rdname create_sparklines -create_sparklines.character <- function(arr, ...) { # nolint +create_sparklines.character <- function(arr, ...) { return(create_sparklines(as.factor(arr))) } @@ -696,7 +696,7 @@ create_sparklines.character <- function(arr, ...) { # nolint #' @export #' @keywords internal #' @rdname create_sparklines -create_sparklines.logical <- function(arr, ...) { # nolint +create_sparklines.logical <- function(arr, ...) { return(create_sparklines(as.factor(arr))) } @@ -711,7 +711,7 @@ create_sparklines.logical <- function(arr, ...) { # nolint #' @export #' @keywords internal #' @rdname create_sparklines -create_sparklines.factor <- function(arr, width = 150, bar_spacing = 5, bar_width = 20, ...) { # nolint +create_sparklines.factor <- function(arr, width = 150, bar_spacing = 5, bar_width = 20, ...) { decreasing_order <- TRUE counts <- table(arr) @@ -751,7 +751,7 @@ create_sparklines.factor <- function(arr, width = 150, bar_spacing = 5, bar_widt #' @export #' @keywords internal #' @rdname create_sparklines -create_sparklines.numeric <- function(arr, width = 150, ...) { # nolint +create_sparklines.numeric <- function(arr, width = 150, ...) { if (any(is.infinite(arr))) { return(as.character(tags$code("infinite values", class = "text-blue"))) } @@ -879,7 +879,7 @@ plot_var_summary <- function(var, wrap_character = NULL, numeric_as_factor, display_density = is.numeric(var), - remove_NA_hist = FALSE, # nolint + remove_NA_hist = FALSE, # nolint object_name_linter outlier_definition, records_for_factor, ggplot2_args) { diff --git a/R/zzz.R b/R/zzz.R index 5ac1d3622..f9db273c7 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -1,4 +1,4 @@ -.onLoad <- function(libname, pkgname) { # nolint +.onLoad <- function(libname, pkgname) { teal.logger::register_logger(namespace = "teal.modules.general") } diff --git a/data-raw/data.R b/data-raw/data.R index 3d0abb238..ab21d2721 100644 --- a/data-raw/data.R +++ b/data-raw/data.R @@ -1,16 +1,16 @@ ## code to prepare `data` for testing examples library(scda) -rADAE <- synthetic_cdisc_data("latest")$adae # nolint +rADAE <- synthetic_cdisc_data("latest")$adae # nolint object_name_linter usethis::use_data(rADAE) -rADLB <- synthetic_cdisc_data("latest")$adlb # nolint +rADLB <- synthetic_cdisc_data("latest")$adlb # nolint object_name_linter usethis::use_data(rADLB) -rADRS <- synthetic_cdisc_data("latest")$adrs # nolint +rADRS <- synthetic_cdisc_data("latest")$adrs # nolint object_name_linter usethis::use_data(rADRS) -rADSL <- synthetic_cdisc_data("latest")$adsl # nolint +rADSL <- synthetic_cdisc_data("latest")$adsl # nolint object_name_linter usethis::use_data(rADSL) -rADTTE <- synthetic_cdisc_data("latest")$adtte # nolint +rADTTE <- synthetic_cdisc_data("latest")$adtte # nolint object_name_linter usethis::use_data(rADTTE)