diff --git a/R/mod_boxplot.R b/R/mod_boxplot.R index a43d2dc..3c82825 100644 --- a/R/mod_boxplot.R +++ b/R/mod_boxplot.R @@ -82,13 +82,15 @@ BP <- poc( # nolint #' It also includes a set of listings with information about the population, distribution and statistical comparisons. #' #' @name mod_boxplot +#' @inheritParams boxplot_server #' #' @keywords main #' NULL -#' @describeIn mod_boxplot UI +#' Boxplot UI function #' @param id Shiny ID `[character(1)]` +#' @keywords developers #' @export boxplot_UI <- function(id) { # nolint # id assert ---- It goes on its own as id is used to provide context to the other assertions @@ -188,7 +190,8 @@ boxplot_UI <- function(id) { # nolint } } -#' @describeIn mod_boxplot Server +#' Boxplot server function +#' @keywords developers #' #' @description #' @@ -727,6 +730,8 @@ boxplot_server <- function(id, #' Shiny ID of the module receiving the selected subject ID in the data listing. This ID must #' be present in the app or be NULL. #' +#' inheritParams boxplot_server +#' #' @name mod_boxplot #' #' @keywords main @@ -861,7 +866,8 @@ dataset_info_boxplot <- function(bm_dataset_name, group_dataset_name, ...) { mod_boxplot <- CM$module(mod_boxplot, check_mod_boxplot, dataset_info_boxplot) -#' @describeIn mod_boxplot Boxplot wrapper when its output is fed into papo module +#' Boxplot wrapper when its output is fed into the papo module +#' @keywords main #' @export mod_boxplot_papo <- function(...) { .Deprecated("mod_boxplot_papo", msg = "'mod_boxplot_papo' is no longer required and should be replaced by 'mod_boxplot'. It is still available for compatibility purposes") # nolint diff --git a/R/mod_corr_hm.R b/R/mod_corr_hm.R index a65146c..7afc8fb 100644 --- a/R/mod_corr_hm.R +++ b/R/mod_corr_hm.R @@ -71,23 +71,21 @@ CH_MSG <- poc( # nolint #' Correlation Heatmap module #' -#' @param id Shiny ID `[character(1)]` -#' #' @param default_cat Default selected categories #' #' @param default_par Default selected parameters #' #' @param default_visit Default selected visits #' -#' @param default_corr_method Name of default correlation method -#' #' @name mod_corr_hm #' #' @keywords main #' NULL -#' @describeIn mod_corr_hm UI +#' Correlation heatmap UI function +#' +#' @keywords developers #' #' @param id `[character(1)]` #' @@ -462,7 +460,9 @@ scatter_plot <- function(df, x_var, y_var) { } -#' @describeIn mod_corr_hm Server +#' Correlation heatmap server function +#' +#' @keywords developers #' #' @param id `[character(1)]` #' @@ -862,6 +862,8 @@ ch_subset_data <- function(sel, cat_col, par_col, val_col, vis_col, bm_ds, subj_ #' #' @name mod_corr_hm #' +#' @inheritParams corr_hm_server +#' #' @keywords main #' #' @export diff --git a/R/mod_forest.R b/R/mod_forest.R index 8c342ff..ccd66c3 100644 --- a/R/mod_forest.R +++ b/R/mod_forest.R @@ -99,15 +99,16 @@ FP_MSG <- poc( #' Forest plot module #' -#' @param id Shiny ID `[character(1)]` -#' #' @name mod_forest +#' @inheritParams forest_server #' #' @keywords main #' NULL -#' @describeIn mod_forest UI +#' Forest plot UI function +#' +#' @keywords developers #' #' @param id `[character(1)]` #' @@ -461,7 +462,9 @@ gen_result_table_fun_ <- function(ds, sl, fun, label) { gen_result_table_fun <- strict(gen_result_table_fun_) -#' @describeIn mod_forest Server +#' Forest plot server function +#' +#' @keywords developers #' #' @param id `[character(1)]` #' diff --git a/R/mod_lineplot.R b/R/mod_lineplot.R index fb4b1d5..96fdafa 100644 --- a/R/mod_lineplot.R +++ b/R/mod_lineplot.R @@ -97,8 +97,9 @@ LP_CNT <- poc( # UI and server functions -#' @describeIn mod_lineplot UI -# NOTE: id documented in lineplot_server +#' Lineplot UI function +#' @inheritParams lineplot_server +#' @keywords developers #' @export lineplot_UI <- function(id) { # UI ---- @@ -545,7 +546,7 @@ generate_ref_line_data <- function(df, show_all_ref_vals) { } -#' @describeIn mod_lineplot Server +#' Lineplot server function #' #' @param id Shiny ID `[character(1)]` #' @@ -635,6 +636,8 @@ generate_ref_line_data <- function(df, show_all_ref_vals) { #' #' Default projection for the Y axis #' +#' @keywords developers +#' #' @export #' lineplot_server <- function(id, @@ -1548,6 +1551,8 @@ lineplot_server <- function(id, #' Shiny ID of the module receiving the selected subject ID in the single subject listing. This ID must #' be present in the app or be NULL. #' +#' @inheritParams lineplot_server +#' #' @name mod_lineplot #' #' @keywords main diff --git a/R/mod_roc.R b/R/mod_roc.R index 5db0c08..2c3bfd4 100644 --- a/R/mod_roc.R +++ b/R/mod_roc.R @@ -147,7 +147,7 @@ ROC_PLOT_VAL <- poc( #' ROC module #' -#' @param id Shiny ID `[character(1)]` +#' @inheritParams roc_server #' #' @name mod_roc #' @@ -155,7 +155,9 @@ ROC_PLOT_VAL <- poc( #' NULL -#' @describeIn mod_roc UI +#' ROC UI function +#' @keywords developers +#' @inheritParams roc_server #' @export roc_UI <- function(id) { # id assert It goes on its own as id is used to provide context to the other assertions @@ -354,8 +356,8 @@ roc_UI <- function(id) { } } -#' @describeIn mod_roc Server -#' +#' ROC server function +#' @keywords developers #' @description #' #' ## Input dataframes: @@ -387,6 +389,7 @@ roc_UI <- function(id) { #' one record per subject #' #' It expects to contain, at least, `subjid_var` +#' @param id Shiny ID `[character(1)]` #' #' @param pred_dataset,resp_dataset,group_dataset `[data.frame()]` #' diff --git a/R/mod_scatter.R b/R/mod_scatter.R index 663772e..0569fd0 100644 --- a/R/mod_scatter.R +++ b/R/mod_scatter.R @@ -86,13 +86,16 @@ SP <- poc( # nolint #' It also includes a set of listings with information about the population and the regression and correlation #' estimates. #' +#' @inheritParams scatterplot_server +#' #' @name mod_scatterplot #' #' @keywords main #' NULL -#' @describeIn mod_scatterplot UI +#' Scatter plot UI function +#' @keywords developers #' @param id Shiny ID `[character(1)]` #' @export scatterplot_UI <- function(id) { # nolint @@ -194,7 +197,9 @@ scatterplot_UI <- function(id) { # nolint } } -#' @describeIn mod_scatterplot Server +#' Scatter plot server function +#' +#' @keywords developers #' #' @description #' diff --git a/R/mod_scatter_matrix.R b/R/mod_scatter_matrix.R index 1b19299..494896c 100644 --- a/R/mod_scatter_matrix.R +++ b/R/mod_scatter_matrix.R @@ -68,12 +68,14 @@ SPM <- poc( # nolint #' of grouping. It also includes correlation stats. #' #' @name mod_scatterplotmatrix +#' @inheritParams scatterplotmatrix_server #' #' @keywords main #' NULL -#' @describeIn mod_scatterplotmatrix UI +#' Scatter plot matrix UI function +#' @keywords developers #' @param id Shiny ID `[character(1)]` #' @export scatterplotmatrix_UI <- function(id) { # nolint @@ -134,8 +136,8 @@ scatterplotmatrix_UI <- function(id) { # nolint } } -#' @describeIn mod_scatterplotmatrix Server -#' +#' Scatter plot matrix server function +#' @keywords developers #' @description #' #' ## Input dataframes: diff --git a/R/mod_wfphm.R b/R/mod_wfphm.R index f46c793..23704f8 100644 --- a/R/mod_wfphm.R +++ b/R/mod_wfphm.R @@ -264,7 +264,8 @@ WFPHM_MSG <- pack_of_constants( # nolint #' NULL -#' @describeIn wfphm_wf UI +#' Waterfall UI function +#' @keywords developers wfphm_wf_UI <- function(id) { # nolintr # id assert ---- It goes on its own as id is used to provide context to the other assertions @@ -311,7 +312,8 @@ wfphm_wf_UI <- function(id) { # nolintr } # nolint start cyclocomp_linter -#' @describeIn wfphm_wf server +#' Waterfall server function +#' @keywords developers wfphm_wf_server <- function(id, bm_dataset, group_dataset, @@ -908,7 +910,8 @@ wfphm_wf_rename_cols <- function(df) { #' NULL -#' @describeIn wfphm_hmcat UI +#' Waterfall plus heatmap categorical heatmap UI function +#' @keywords developers wfphm_hmcat_UI <- function(id) { # nolint # id assert ---- It goes on its own as id is used to provide context to the other assertions @@ -943,7 +946,8 @@ wfphm_hmcat_UI <- function(id) { # nolint ) } -#' @describeIn wfphm_hmcat server +#' Waterfall plus heatmap categorical heatmap server function +#' @keywords developers wfphm_hmcat_server <- function(id, dataset, subjid_var, @@ -1906,9 +1910,7 @@ wfphm_hmpar_subset <- function( #' #' See the subsections for each of plots particularities #' -#' @param id Shiny ID `[character(1)]` -#' -#' @param bm_dataset `[shiny::reactive(data.frame) | shinymeta::metaReactive(data.frame)]` +#' @param module_id Shiny ID `[character(1)]` #' #' It expects the following format: #' @@ -1917,8 +1919,6 @@ wfphm_hmpar_subset <- function( #' - `cat_var`, `par_var`, `visit_var` and `subjid_var` columns are factors #' - It contains at least 1 row #' -#' @param group_dataset `[shiny::reactive(data.frame) | shinymeta::metaReactive(data.frame)]` -#' #' It expects the following format: #' #' - it contains, at least, the columns specified in the parameters: `subjid_var` @@ -1939,8 +1939,6 @@ wfphm_hmpar_subset <- function( #' named vector containing a set of transformation where the name is the string shown in the selector and the value is #' function to be applied according to details section. #' -#' @param tr_choices the names of the entries in tr_mapper -#' #' @param bar_group_palette `[list(palettes)]` #' #' list of custom palettes to apply to bar_grouping. It receives the values used for grouping and must return a DaVinci @@ -1980,8 +1978,12 @@ wfphm_hmpar_subset <- function( #' NULL -#' @describeIn wfphm UI +#' Waterfall plus heatmap UI function +#' +#' @param id Shiny ID `[character(1)]` +#' @param tr_choices the names of the entries in tr_mapper #' +#' @keywords developers #' @export wfphm_UI <- function(id, tr_choices = names(tr_mapper_def())) { # nolint @@ -2066,8 +2068,14 @@ wfphm_UI <- function(id, tr_choices = names(tr_mapper_def())) { # nolint wfphm_mainpanel } -#' @describeIn wfphm server +#' Waterfall plus heatmap server function +#' @keywords developers +#' @param bm_dataset `[shiny::reactive(data.frame) | shinymeta::metaReactive(data.frame)]` +#' @param group_dataset `[shiny::reactive(data.frame) | shinymeta::metaReactive(data.frame)]` #' +#' @keywords developers +#' @inheritParams wfphm_UI +#' @inheritParams mod_wfphm #' @export wfphm_server <- function(id, bm_dataset, @@ -2244,7 +2252,6 @@ tr_mapper_def <- function() { #' @describeIn wfphm dv.manager wrapper for the module #' -#' @param module_id Shiny id #' @param bm_dataset_name,group_dataset_name #' #' The name of the dataset diff --git a/_pkgdown.yml b/_pkgdown.yml index 30c9fca..1c88e77 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -18,6 +18,9 @@ reference: - title: Mock Applications - contents: - has_keyword("mock") + - title: For developers + - contents: + - has_keyword("developers") - title: Additional Documentation - subtitle: Lineplot - contents: diff --git a/man/mod_boxplot.Rd b/man/mod_boxplot.Rd index 12cbe50..0e48b38 100644 --- a/man/mod_boxplot.Rd +++ b/man/mod_boxplot.Rd @@ -2,34 +2,8 @@ % Please edit documentation in R/mod_boxplot.R \name{mod_boxplot} \alias{mod_boxplot} -\alias{boxplot_UI} -\alias{boxplot_server} -\alias{mod_boxplot_papo} \title{Boxplot module} \usage{ -boxplot_UI(id) - -boxplot_server( - id, - bm_dataset, - group_dataset, - dataset_name = shiny::reactive(character(0)), - cat_var = "PARCAT", - par_var = "PARAM", - value_vars = "AVAL", - visit_var = "AVISIT", - subjid_var = "SUBJID", - default_cat = NULL, - default_par = NULL, - default_visit = NULL, - default_value = NULL, - default_main_group = NULL, - default_sub_group = NULL, - default_page_group = NULL, - on_sbj_click = function(x) { - } -) - mod_boxplot( module_id, bm_dataset_name, @@ -49,21 +23,24 @@ mod_boxplot( default_page_group = NULL, server_wrapper_func = function(x) list(subj_id = x) ) - -mod_boxplot_papo(...) } \arguments{ -\item{id}{Shiny ID \verb{[character(1)]}} +\item{module_id}{\verb{[character(1)]} -\item{bm_dataset, group_dataset}{\verb{[data.frame()]} +Module Shiny id} -Dataframes as described in the \verb{Input dataframes} section} +\item{bm_dataset_name, group_dataset_name}{\verb{[character(1)]} -\item{dataset_name}{\verb{[shiny::reactive(*)]} +Name of the dataset} -a reactive indicating when the dataset has possibly changed its columns} +\item{receiver_id}{\verb{[character(1)]} + +Shiny ID of the module receiving the selected subject ID in the data listing. This ID must +be present in the app or be NULL. -\item{cat_var, par_var, visit_var, }{\verb{[character(1)]} +inheritParams boxplot_server} + +\item{cat_var, par_var, visit_var}{\verb{[character(1)]} Columns from \code{bm_dataset} that correspond to the parameter category, parameter and visit} @@ -79,23 +56,6 @@ Column corresponding to subject ID} Default values for the selectors} -\item{on_sbj_click}{\verb{[function()]} - -Function to invoke when a subject is clicked in the single subject listing} - -\item{module_id}{\verb{[character(1)]} - -Module Shiny id} - -\item{bm_dataset_name, group_dataset_name}{\verb{[character(1)]} - -Name of the dataset} - -\item{receiver_id}{\verb{[character(1)]} - -Shiny ID of the module receiving the selected subject ID in the data listing. This ID must -be present in the app or be NULL.} - \item{server_wrapper_func}{\verb{[function()]} A function that will be applied to the server returned value. Its default value will work for the current cases.} @@ -103,41 +63,9 @@ A function that will be applied to the server returned value. Its default value \description{ \code{mod_boxplot} is a Shiny module prepared to display data with boxplot charts with different levels of grouping. It also includes a set of listings with information about the population, distribution and statistical comparisons. - -\subsection{Input dataframes:}{ -\subsection{bm_dataset}{ - -It expects a dataset similar to -https://www.cdisc.org/kb/examples/adam-basic-data-structure-bds-using-paramcd-80288192 , -1 record per subject per parameter per analysis visit. - -It must contain, at least, the columns passed in the parameters, \code{subjid_var}, \code{cat_var}, \code{par_var}, -\code{visit_var} and \code{value_vars}. The values of these variables are as described -in the CDISC standard for the variables USUBJID, PARCAT, PARAM, AVISIT and AVAL. -} - -\subsection{group_dataset}{ - -It expects a dataset with an structure similar to -https://www.cdisc.org/kb/examples/adam-subject-level-analysis-adsl-dataset-80283806 , -one record per subject. - -It must contain, at least, the column passed in the parameter, \code{subjid_var}. -} - -} } \details{ \code{mod_boxplot_papo} is a deprecated function that was required to use the jumping feature in combination with \code{dv.papo} but is no longer required. The function is still available for compatibility reasons. } -\section{Functions}{ -\itemize{ -\item \code{boxplot_UI()}: UI - -\item \code{boxplot_server()}: Server - -\item \code{mod_boxplot_papo()}: Boxplot wrapper when its output is fed into papo module - -}} \keyword{main} diff --git a/man/mod_corr_hm.Rd b/man/mod_corr_hm.Rd index 4431a80..50921b0 100644 --- a/man/mod_corr_hm.Rd +++ b/man/mod_corr_hm.Rd @@ -2,29 +2,8 @@ % Please edit documentation in R/mod_corr_hm.R \name{mod_corr_hm} \alias{mod_corr_hm} -\alias{corr_hm_UI} -\alias{corr_hm_server} \title{Correlation Heatmap module} \usage{ -corr_hm_UI( - id, - default_cat = NULL, - default_par = NULL, - default_visit = NULL, - default_corr_method = NULL -) - -corr_hm_server( - id, - bm_dataset, - subjid_var = "SUBJID", - cat_var = "PARCAT", - par_var = "PARAM", - visit_var = "AVISIT", - value_vars = "AVAL", - default_value = NULL -) - mod_corr_hm( module_id, bm_dataset_name, @@ -40,28 +19,13 @@ mod_corr_hm( ) } \arguments{ -\item{id}{\verb{[character(1)]} - -Shiny ID} - -\item{default_cat}{Default selected categories} - -\item{default_par}{Default selected parameters} - -\item{default_visit}{Default selected visits} - -\item{default_corr_method}{Name of default correlation method} +\item{module_id}{Shiny ID \verb{[character(1)]} -\item{bm_dataset}{\verb{[data.frame()]} +Module identifier} -An ADBM-like dataset similar in structure to the one in -\href{https://www.cdisc.org/kb/examples/adam-basic-data-structure-bds-using-paramcd-80288192}{this example}, -with one record per subject per parameter per analysis visit. +\item{bm_dataset_name}{\verb{[character(1)]} -It should have, at least, the columns specified by the parameters \code{subjid_var}, \code{cat_var}, -\code{par_var}, \code{visit_var} and \code{value_vars}. -The semantics of these columns are as described in the CDISC standard for variables -USUBJID, PARCAT, PARAM, AVISIT and AVAL, respectively.} +Biomarker dataset name} \item{subjid_var}{\verb{[character(1)]} @@ -75,27 +39,18 @@ Columns from \code{bm_dataset} that correspond to the parameter category, parame Columns from \code{bm_dataset} that correspond to values of the parameters} -\item{default_value}{\verb{[character(1)|NULL]} - -Default values for the selectors} +\item{default_cat}{Default selected categories} -\item{module_id}{Shiny ID \verb{[character(1)]} +\item{default_par}{Default selected parameters} -Module identifier} +\item{default_visit}{Default selected visits} -\item{bm_dataset_name}{\verb{[character(1)]} +\item{default_value}{\verb{[character(1)|NULL]} -Biomarker dataset name} +Default values for the selectors} } \description{ Display a heatmap of correlation coefficients (Pearson, Spearman) along with confidence intervals and p-values between dataset parameters over a single visit. } -\section{Functions}{ -\itemize{ -\item \code{corr_hm_UI()}: UI - -\item \code{corr_hm_server()}: Server - -}} \keyword{main} diff --git a/man/mod_forest.Rd b/man/mod_forest.Rd index b113a39..e52919b 100644 --- a/man/mod_forest.Rd +++ b/man/mod_forest.Rd @@ -2,39 +2,8 @@ % Please edit documentation in R/mod_forest.R \name{mod_forest} \alias{mod_forest} -\alias{forest_UI} -\alias{forest_server} \title{Forest plot module} \usage{ -forest_UI( - id, - numeric_numeric_function_names = character(0), - numeric_factor_function_names = character(0), - default_function = NULL -) - -forest_server( - id, - bm_dataset, - group_dataset, - dataset_name = shiny::reactive(character(0)), - numeric_numeric_functions = list(), - numeric_factor_functions = list(), - subjid_var = "SUBJID", - cat_var = "PARCAT", - par_var = "PARAM", - visit_var = "AVISIT", - value_vars = "AVAL", - default_cat = NULL, - default_par = NULL, - default_visit = NULL, - default_value = NULL, - default_var = NULL, - default_group = NULL, - default_categorical_A = NULL, - default_categorical_B = NULL -) - mod_forest( module_id, bm_dataset_name, @@ -59,41 +28,13 @@ mod_forest( ) } \arguments{ -\item{id}{\verb{[character(1)]} - -Shiny ID} - -\item{numeric_numeric_function_names, numeric_factor_function_names}{\verb{[character(1)]} - -Vectors of names of functions passed as \code{numeric_numeric_functions} and \code{numeric_factor_functions} -to \code{forest_server}} - -\item{default_function}{\verb{[character(1)]} - -Default function} - -\item{bm_dataset}{\verb{[data.frame()]} - -An ADBM-like dataset similar in structure to the one in -\href{https://www.cdisc.org/kb/examples/adam-basic-data-structure-bds-using-paramcd-80288192}{this example}, -with one record per subject per parameter per analysis visit. - -It should have, at least, the columns specified by the parameters \code{subjid_var}, \code{cat_var}, -\code{par_var}, \code{visit_var} and \code{value_vars}. -The semantics of these columns are as described in the CDISC standard for variables -USUBJID, PARCAT, PARAM, AVISIT and AVAL, respectively.} - -\item{group_dataset}{\verb{[data.frame()]} - -An ADSL-like dataset similar in structure to the one in -\href{https://www.cdisc.org/kb/examples/adam-subject-level-analysis-adsl-dataset-80283806}{this example}, -with one record per subject. +\item{module_id}{Shiny ID \verb{[character(1)]} -It should contain, at least, the column specified by the parameter \code{subjid_var}.} +Module identifier} -\item{dataset_name}{\verb{[shiny::reactive(*)]} +\item{bm_dataset_name, group_dataset_name}{\verb{[character(1)]} -A reactive that indicates a possible change in the column structure of any of the two datasets} +Dataset names} \item{numeric_numeric_functions, numeric_factor_functions}{\verb{[function(n)]} @@ -131,24 +72,9 @@ Default values for the selectors} \item{default_var, default_group, default_categorical_A, default_categorical_B}{\verb{[character(1)|NULL]} Default values for the selectors} - -\item{module_id}{Shiny ID \verb{[character(1)]} - -Module identifier} - -\item{bm_dataset_name, group_dataset_name}{\verb{[character(1)]} - -Dataset names} } \description{ Display a hybrid table/forest plot of arbitrary statistics (correlations, odds ratios, ...) computed on dataset parameters over a single visit. } -\section{Functions}{ -\itemize{ -\item \code{forest_UI()}: UI - -\item \code{forest_server()}: Server - -}} \keyword{main} diff --git a/man/mod_lineplot.Rd b/man/mod_lineplot.Rd index eecabbb..8b66354 100644 --- a/man/mod_lineplot.Rd +++ b/man/mod_lineplot.Rd @@ -1,40 +1,9 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/mod_lineplot.R -\name{lineplot_UI} -\alias{lineplot_UI} -\alias{lineplot_server} +\name{mod_lineplot} \alias{mod_lineplot} \title{Line plot module} \usage{ -lineplot_UI(id) - -lineplot_server( - id, - bm_dataset, - group_dataset, - summary_fns = list(Mean = lp_mean_summary_fns, Median = lp_median_summary_fns), - subjid_var = "SUBJID", - cat_var = "PARCAT", - par_var = "PARAM", - visit_vars = c("AVISIT"), - cdisc_visit_vars = character(0), - value_vars = "AVAL", - additional_listing_vars = character(0), - ref_line_vars = character(0), - on_sbj_click = NULL, - default_centrality_fn = NULL, - default_dispersion_fn = NULL, - default_cat = NULL, - default_par = NULL, - default_val = NULL, - default_visit_var = NULL, - default_visit_val = NULL, - default_main_group = NULL, - default_sub_group = NULL, - default_transparency = 1, - default_y_axis_projection = "Linear" -) - mod_lineplot( module_id, bm_dataset_name, @@ -63,29 +32,18 @@ mod_lineplot( ) } \arguments{ -\item{id}{Shiny ID \verb{[character(1)]}} - -\item{bm_dataset}{\verb{[data.frame()]} - -An ADBM-like dataset similar in structure to the one in -\href{https://www.cdisc.org/kb/examples/adam-basic-data-structure-bds-using-paramcd-80288192}{this example}, -with one record per subject per parameter per analysis visit. +\item{module_id}{Shiny ID \verb{[character(1)]} -It should have, at least, the columns specified by the parameters \code{subjid_var}, \code{cat_var}, -\code{par_var}, \code{visit_vars} and \code{value_vars}. -The semantics of these columns are as described in the CDISC standard for variables -USUBJID, PARCAT, PARAM, AVISIT and AVAL, respectively. +Module identifier} -Optional columns specified by \code{ref_line_vars} should contain the same numeric value for all -records of the same parameter for any given subject.} +\item{bm_dataset_name, group_dataset_name}{\verb{[character(1)]} -\item{group_dataset}{\verb{[data.frame()]} +Dataset names} -An ADSL-like dataset similar in structure to the one in -\href{https://www.cdisc.org/kb/examples/adam-subject-level-analysis-adsl-dataset-80283806}{this example}, -with one record per subject. +\item{receiver_id}{\verb{[character(1)]} -It should contain, at least, the column specified by the parameter \code{subjid_var}.} +Shiny ID of the module receiving the selected subject ID in the single subject listing. This ID must +be present in the app or be NULL.} \item{summary_fns}{\verb{[list()]} @@ -128,10 +86,6 @@ Columns from \code{bm_dataset} that will be appended to the single-subject listi Columns for \code{bm_dataset} specifying reference values for parameters. See \href{../articles/lineplot_reference_values.html}{this article} for more details} -\item{on_sbj_click}{\verb{[function()]} - -Function to invoke when a subject is clicked in the single-subject listing} - \item{default_cat, default_par, default_visit_var, default_main_group}{\verb{[character(1)|NULL]} Default values for the selectors} @@ -152,29 +106,9 @@ Default values for the selectors} \item{default_y_axis_projection}{\verb{["Linear"|"Logarithmic"]} Default projection for the Y axis} - -\item{module_id}{Shiny ID \verb{[character(1)]} - -Module identifier} - -\item{bm_dataset_name, group_dataset_name}{\verb{[character(1)]} - -Dataset names} - -\item{receiver_id}{\verb{[character(1)]} - -Shiny ID of the module receiving the selected subject ID in the single subject listing. This ID must -be present in the app or be NULL.} } \description{ Display line plots of raw or summary data over time. Summaries include measures of central tendency (mean, median) and optional deviation and confidence estimators. } -\section{Functions}{ -\itemize{ -\item \code{lineplot_UI()}: UI - -\item \code{lineplot_server()}: Server - -}} \keyword{main} diff --git a/man/mod_roc.Rd b/man/mod_roc.Rd index 703abe4..bce876c 100644 --- a/man/mod_roc.Rd +++ b/man/mod_roc.Rd @@ -2,31 +2,8 @@ % Please edit documentation in R/mod_roc.R \name{mod_roc} \alias{mod_roc} -\alias{roc_UI} -\alias{roc_server} \title{ROC module} \usage{ -roc_UI(id) - -roc_server( - id, - pred_dataset, - resp_dataset, - group_dataset, - dataset_name = shiny::reactive(character(0)), - pred_cat_var = "PARCAT", - pred_par_var = "PARAM", - pred_value_vars = "AVAL", - pred_visit_var = "AVISIT", - resp_cat_var = "PARCAT", - resp_par_var = "PARAM", - resp_value_vars = c("CHG1", "CHG2"), - resp_visit_var = "AVISIT", - subjid_var = "SUBJID", - compute_roc_fn = compute_roc_data, - compute_metric_fn = compute_metric_data -) - mod_roc( module_id, pred_dataset_name, @@ -46,15 +23,11 @@ mod_roc( ) } \arguments{ -\item{id}{Shiny ID \verb{[character(1)]}} - -\item{pred_dataset, resp_dataset, group_dataset}{\verb{[data.frame()]} - -Dataframes as described in the \verb{Input dataframes} section} +\item{module_id}{\verb{[character(1)]} -\item{dataset_name}{\verb{[shiny::reactive(*)]} +Module identificator} -a reactive indicating when the dataset has possibly changed its columns} +\item{pred_dataset_name, resp_dataset_name, group_dataset_name}{Name of the dataset} \item{pred_cat_var, pred_par_var, pred_visit_var, resp_cat_var, resp_par_var, resp_visit_var}{\verb{[character(1)]} @@ -71,53 +44,10 @@ Column corresponding to subject ID} \item{compute_roc_fn, compute_metric_fn}{\verb{[function()]} Functions used to compute the ROC and metric analysis, please view the corresponding vignette for more details.} - -\item{module_id}{\verb{[character(1)]} - -Module identificator} - -\item{pred_dataset_name, resp_dataset_name, group_dataset_name}{Name of the dataset} } \description{ -\subsection{Input dataframes:}{ -\subsection{pred_dataset}{ - -It expects a dataset similar to -https://www.cdisc.org/kb/examples/adam-basic-data-structure-bds-using-paramcd-80288192 , -1 record per subject per parameter per analysis visit - -It expects, at least, the columns passed in the parameters, \code{subjid_var}, \code{pred_cat_var}, \code{pred_par_var}, -\code{pred_visit_var} and \code{pred_value_var}. The values of these variables are as described -in the CDISC standard for the variables USUBJID, PARCAT, PARAM, AVISIT and AVAL. -} - -\subsection{resp_dataset}{ - -It expects a dataset similar to -https://www.cdisc.org/kb/examples/adam-basic-data-structure-bds-using-paramcd-80288192 +ROC module -It expects, at least, the columns passed in the parameters, \code{subjid_var}, \code{resp_cat_var}, -\code{resp_par_var}, \code{resp_visit_var} and \code{resp_value_var}. -The values of these variables are as described -in the CDISC standard for the variables USUBJID, PARCAT, PARAM, AVISIT and AVAL. +Invoke ROC module } - -\subsection{group_dataset}{ - -It expects a dataset with an structure similar to -https://www.cdisc.org/kb/examples/adam-subject-level-analysis-adsl-dataset-80283806 , -one record per subject - -It expects to contain, at least, \code{subjid_var} -} - -} -} -\section{Functions}{ -\itemize{ -\item \code{roc_UI()}: UI - -\item \code{roc_server()}: Server - -}} \keyword{main} diff --git a/man/mod_scatterplot.Rd b/man/mod_scatterplot.Rd index 3445de9..ed7a2b4 100644 --- a/man/mod_scatterplot.Rd +++ b/man/mod_scatterplot.Rd @@ -2,35 +2,8 @@ % Please edit documentation in R/mod_scatter.R \name{mod_scatterplot} \alias{mod_scatterplot} -\alias{scatterplot_UI} -\alias{scatterplot_server} \title{Scatterplot module} \usage{ -scatterplot_UI(id) - -scatterplot_server( - id, - bm_dataset, - group_dataset, - dataset_name = shiny::reactive(character(0)), - cat_var = "PARCAT", - par_var = "PARAM", - value_vars = "AVAL", - visit_var = "AVISIT", - subjid_var = "SUBJID", - default_x_cat = NULL, - default_x_par = NULL, - default_x_value = NULL, - default_x_visit = NULL, - default_y_cat = NULL, - default_y_par = NULL, - default_y_value = NULL, - default_y_visit = NULL, - default_group = NULL, - default_color = NULL, - compute_lm_cor_fn = sp_compute_lm_cor_default -) - mod_scatterplot( module_id, bm_dataset_name, @@ -54,15 +27,13 @@ mod_scatterplot( ) } \arguments{ -\item{id}{Shiny ID \verb{[character(1)]}} - -\item{bm_dataset, group_dataset}{\verb{[data.frame()]} +\item{module_id}{\verb{[character(1)]} -Dataframes as described in the \verb{Input dataframes} section} +Module Shiny id} -\item{dataset_name}{\verb{[shiny::reactive(*)]} +\item{bm_dataset_name, group_dataset_name}{\verb{[character(1)]} -a reactive indicating when the dataset has possibly changed its columns} +Name of the dataset} \item{cat_var, par_var, visit_var}{\verb{[character(1)]} @@ -88,49 +59,11 @@ Default values for the selectors} Function used to compute the linear regression model and correlation statistics, please view the corresponding vignette for more details.} - -\item{module_id}{\verb{[character(1)]} - -Module Shiny id} - -\item{bm_dataset_name, group_dataset_name}{\verb{[character(1)]} - -Name of the dataset} } \description{ \code{mod_scatterplot} is a Shiny module prepared to display a scatterplot of two biomarkers with different levels of grouping. It also includes a set of listings with information about the population and the regression and correlation estimates. - -\subsection{Input dataframes:}{ -\subsection{bm_dataset}{ - -It expects a dataset similar to -https://www.cdisc.org/kb/examples/adam-basic-data-structure-bds-using-paramcd-80288192 , -1 record per subject per parameter per analysis visit - -It expects, at least, the columns passed in the parameters, \code{subjid_var}, \code{cat_var}, \code{par_var}, -\code{visit_var} and \code{value_var}. The values of these variables are as described -in the CDISC standard for the variables USUBJID, PARCAT, PARAM, AVISIT and AVAL. -} - -\subsection{group_dataset}{ - -It expects a dataset with an structure similar to -https://www.cdisc.org/kb/examples/adam-subject-level-analysis-adsl-dataset-80283806 , -one record per subject - -It expects to contain, at least, \code{subjid_var} } - -} -} -\section{Functions}{ -\itemize{ -\item \code{scatterplot_UI()}: UI - -\item \code{scatterplot_server()}: Server - -}} \keyword{main} diff --git a/man/mod_scatterplotmatrix.Rd b/man/mod_scatterplotmatrix.Rd index d1d2326..c9facd7 100644 --- a/man/mod_scatterplotmatrix.Rd +++ b/man/mod_scatterplotmatrix.Rd @@ -2,29 +2,8 @@ % Please edit documentation in R/mod_scatter_matrix.R \name{mod_scatterplotmatrix} \alias{mod_scatterplotmatrix} -\alias{scatterplotmatrix_UI} -\alias{scatterplotmatrix_server} \title{Matrix of scatterplots module} \usage{ -scatterplotmatrix_UI(id) - -scatterplotmatrix_server( - id, - bm_dataset, - group_dataset, - dataset_name = shiny::reactive(character(0)), - cat_var = "PARCAT", - par_var = "PARAM", - value_vars = "AVAL", - visit_var = "AVISIT", - subjid_var = "SUBJID", - default_cat = NULL, - default_par = NULL, - default_visit = NULL, - default_value = NULL, - default_main_group = NULL -) - mod_scatterplotmatrix( module_id, bm_dataset_name, @@ -42,17 +21,15 @@ mod_scatterplotmatrix( ) } \arguments{ -\item{id}{Shiny ID \verb{[character(1)]}} - -\item{bm_dataset, group_dataset}{\verb{[data.frame()]} +\item{module_id}{\verb{[character(1)]} -Dataframes as described in the \verb{Input dataframes} section} +Module Shiny id} -\item{dataset_name}{\verb{[shiny::reactive(*)]} +\item{bm_dataset_name, group_dataset_name}{\verb{[character(1)]} -a reactive indicating when the dataset has possibly changed its columns} +Name of the dataset} -\item{cat_var, par_var, visit_var, }{\verb{[character(1)]} +\item{cat_var, par_var, visit_var}{\verb{[character(1)]} Columns from \code{bm_dataset} that correspond to the parameter category, parameter and visit} @@ -67,47 +44,9 @@ Column corresponding to subject ID} \item{default_cat, default_par, default_visit, default_value, default_main_group}{\verb{[character(1)|NULL]} Default values for the selectors} - -\item{module_id}{\verb{[character(1)]} - -Module Shiny id} - -\item{bm_dataset_name, group_dataset_name}{\verb{[character(1)]} - -Name of the dataset} } \description{ \code{mod_scatterplotmatrix} is a Shiny module prepared to display data in a matrix of scatterplots with different levels of grouping. It also includes correlation stats. - -\subsection{Input dataframes:}{ -\subsection{bm_dataset}{ - -It expects a dataset similar to -https://www.cdisc.org/kb/examples/adam-basic-data-structure-bds-using-paramcd-80288192 , -1 record per subject per parameter per analysis visit. - -It must contain, at least, the columns passed in the parameters, \code{subjid_var}, \code{cat_var}, \code{par_var}, -\code{visit_var} and \code{value_var}. The values of these variables are as described -in the CDISC standard for the variables USUBJID, PARCAT, PARAM, AVISIT and AVAL. } - -\subsection{group_dataset}{ - -It expects a dataset with an structure similar to -https://www.cdisc.org/kb/examples/adam-subject-level-analysis-adsl-dataset-80283806 , -one record per subject. - -It must contain, at least, the column passed in the parameter, \code{subjid_var}. -} - -} -} -\section{Functions}{ -\itemize{ -\item \code{scatterplotmatrix_UI()}: UI - -\item \code{scatterplotmatrix_server()}: Server - -}} \keyword{main} diff --git a/man/wfphm.Rd b/man/wfphm.Rd index 6fa164e..43b5e0f 100644 --- a/man/wfphm.Rd +++ b/man/wfphm.Rd @@ -2,28 +2,9 @@ % Please edit documentation in R/mod_wfphm.R \name{wfphm} \alias{wfphm} -\alias{wfphm_UI} -\alias{wfphm_server} \alias{mod_wfphm} \title{Waterfall heatmap shiny module} \usage{ -wfphm_UI(id, tr_choices = names(tr_mapper_def())) - -wfphm_server( - id, - bm_dataset, - group_dataset, - cat_var = "PARCAT1", - par_var = "PARAM", - visit_var = "AVISIT", - subjid_var = "SUBJID", - value_vars = "AVAL", - bar_group_palette = list(), - cat_palette = list(), - tr_mapper = tr_mapper_def(), - show_x_ticks = TRUE -) - mod_wfphm( module_id, bm_dataset_name, @@ -40,11 +21,7 @@ mod_wfphm( ) } \arguments{ -\item{id}{Shiny ID \verb{[character(1)]}} - -\item{tr_choices}{the names of the entries in tr_mapper} - -\item{bm_dataset}{\verb{[shiny::reactive(data.frame) | shinymeta::metaReactive(data.frame)]} +\item{module_id}{Shiny ID \verb{[character(1)]} It expects the following format: \itemize{ @@ -52,9 +29,7 @@ It expects the following format: and \code{subjid_var} \item \code{cat_var}, \code{par_var}, \code{visit_var} and \code{subjid_var} columns are factors \item It contains at least 1 row -}} - -\item{group_dataset}{\verb{[shiny::reactive(data.frame) | shinymeta::metaReactive(data.frame)]} +} It expects the following format: \itemize{ @@ -63,6 +38,8 @@ It expects the following format: \item It contains at least 1 row }} +\item{bm_dataset_name, group_dataset_name}{The name of the dataset} + \item{cat_var, par_var, visit_var, subjid_var}{\verb{[character(1)]} columns used as indicated in each of the subplots} @@ -91,10 +68,6 @@ function to be applied according to details section.} \item{show_x_ticks}{\verb{[logical(1)]} show x ticks in the parameter heatmap} - -\item{module_id}{Shiny id} - -\item{bm_dataset_name, group_dataset_name}{The name of the dataset} } \value{ \subsection{UI}{ @@ -132,10 +105,6 @@ plot. } \section{Functions}{ \itemize{ -\item \code{wfphm_UI()}: UI - -\item \code{wfphm_server()}: server - \item \code{mod_wfphm()}: dv.manager wrapper for the module }} diff --git a/man/wfphm_hmcat.Rd b/man/wfphm_hmcat.Rd index 8ed9d0d..fc07de7 100644 --- a/man/wfphm_hmcat.Rd +++ b/man/wfphm_hmcat.Rd @@ -2,21 +2,7 @@ % Please edit documentation in R/mod_wfphm.R \name{wfphm_hmcat} \alias{wfphm_hmcat} -\alias{wfphm_hmcat_UI} -\alias{wfphm_hmcat_server} \title{Categorical heatmap component of WFPHM} -\usage{ -wfphm_hmcat_UI(id) - -wfphm_hmcat_server( - id, - dataset, - subjid_var, - sorted_x, - cat_palette = list(), - margin -) -} \arguments{ \item{id}{Shiny ID \verb{[character(1)]}} @@ -63,13 +49,6 @@ A list with one entry: \description{ Presents a heatmap plot for categorical variables } -\section{Functions}{ -\itemize{ -\item \code{wfphm_hmcat_UI()}: UI - -\item \code{wfphm_hmcat_server()}: server - -}} \section{Data subsetting:}{ \itemize{ \item Allows selecting several columns from all factor or character columns, from now on \strong{category_selection}. diff --git a/man/wfphm_wf.Rd b/man/wfphm_wf.Rd index b50c60f..11a640c 100644 --- a/man/wfphm_wf.Rd +++ b/man/wfphm_wf.Rd @@ -2,32 +2,19 @@ % Please edit documentation in R/mod_wfphm.R \name{wfphm_wf} \alias{wfphm_wf} -\alias{wfphm_wf_UI} -\alias{wfphm_wf_server} \title{Waterfall component of WFPHM} -\usage{ -wfphm_wf_UI(id) - -wfphm_wf_server( - id, - bm_dataset, - group_dataset, - cat_var, - par_var, - visit_var, - subjid_var, - value_vars, - .default_group_palette = function(x) { - pal_get_cat_palette(x, - viridisLite::viridis(length(unique(x)))) - }, - bar_group_palette = list(), - margin -) -} \arguments{ \item{id}{Shiny ID \verb{[character(1)]}} +\item{dataset}{\verb{[shiny::reactive(data.frame) | shinymeta::metaReactive(data.frame)]} + +It expects the following format: +\itemize{ +\item it contains, at least, the columns specified in the parameters: \code{cat_var}, \code{par_var}, \code{value_vars}, \code{visit_var} +and \code{subjid_var} +\item \code{cat_var}, \code{par_var}, \code{visit_var} and \code{subjid_var} columns are factors +}} + \item{cat_var, par_var, visit_var, subjid_var}{\verb{[character(1)]} columns used as indicated in the details section} @@ -45,15 +32,6 @@ grouping} \item{margin}{\verb{[numeric(4) | shiny::reactive(numeric(4)) | shinymeta::metaReactive(numeric(4))]} margin to be used on each of the sides. It must contain four entries named \code{top}, \code{bottom}, \code{left} and \code{right}} - -\item{dataset}{\verb{[shiny::reactive(data.frame) | shinymeta::metaReactive(data.frame)]} - -It expects the following format: -\itemize{ -\item it contains, at least, the columns specified in the parameters: \code{cat_var}, \code{par_var}, \code{value_vars}, \code{visit_var} -and \code{subjid_var} -\item \code{cat_var}, \code{par_var}, \code{visit_var} and \code{subjid_var} columns are factors -}} } \value{ \subsection{UI}{ @@ -174,11 +152,4 @@ Then a call to \link{bar_D3} is done with the following arguments: } } } -\section{Functions}{ -\itemize{ -\item \code{wfphm_wf_UI()}: UI - -\item \code{wfphm_wf_server()}: server - -}} \keyword{internal}