Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions R/tm_outliers.R
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
#' Outliers Module
#' Outliers module
#'
#' Module to analyze and identify outliers using different methods
#' such as IQR, Z-score, and Percentiles, and offers visualizations including
#' box plots, density plots, and cumulative distribution plots to help interpret the outliers.
#'
#' @inheritParams teal::module
#' @inheritParams shared_params
#'
#' @param outlier_var (`data_extract_spec` or `list` of multiple `data_extract_spec`)
#' variable to consider for the outliers analysis.
#' @param categorical_var (`data_extract_spec` or `list` of multiple `data_extract_spec`)
#' categorical factor to split the selected outlier variables on.
#' Specifies variable(s) to be analyzed for outliers.
#' @param categorical_var (`data_extract_spec` or `list` of multiple `data_extract_spec`, optional)
#' Specifies the categorical variable(s) to split the selected outlier variables on.
#'
#' @templateVar ggnames "Boxplot","Density Plot","Cumulative Distribution Plot"
#' @template ggplot2_args_multi
#'
#' @examples
#' # general data example
#' library(teal.widgets)
#'
#' # general data example
#' data <- teal_data()
#' data <- within(data, {
#' CO2 <- CO2
Expand Down Expand Up @@ -67,8 +69,6 @@
#' }
#'
#' # CDISC data example
#' library(teal.widgets)
#'
#' data <- teal_data()
#' data <- within(data, {
#' ADSL <- rADSL
Expand Down Expand Up @@ -169,6 +169,7 @@ tm_outliers <- function(label = "Outliers Module",
)
}

# UI function for the outliers module
ui_outliers <- function(id, ...) {
args <- list(...)
ns <- NS(id)
Expand Down Expand Up @@ -300,6 +301,7 @@ ui_outliers <- function(id, ...) {
)
}

# Server function for the outliers module
srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var,
categorical_var, plot_height, plot_width, ggplot2_args) {
with_reporter <- !missing(reporter) && inherits(reporter, "Reporter")
Expand Down
14 changes: 7 additions & 7 deletions man/tm_outliers.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.