matchAppServer: Shiny app server for matching and exploration of two datasets

View source: R/matchApp.R

matchAppServerR Documentation

Shiny app server for matching and exploration of two datasets

Description

Shiny app server for matching and exploration of two datasets

Usage

matchAppServer(
  id,
  refname = "Reference Cohort",
  refdata,
  subsetv,
  subsets,
  customdata = "Cohort",
  defaultvalue = "CohortX",
  vars,
  guess = NULL,
  informd = system.file("info/cohort_exchange.Rmd", package = "DIVE"),
  appdata = NULL
)

Arguments

id

Character ID for specifying namespace, see shiny::NS.

refname

Name of the reference dataset, used for labels. Defaults to "Reference Cohort".

refdata

Reference dataset that can be matched against in whole or in part, i.e. the match pool.

subsetv

Name of the subset-by variable in the data.

subsets

Optional, a list to display groups with higher-level grouping in the selection. By default, the selection is composed of unique values in subsetv.

customdata

A name for the appended colum to user-uploaded input data. This depends on the type of data expected. "Cohort" is the provided default for cohort-matching application. See customDatasetServer.

defaultvalue

Default attribute value to append to user-uploaded input data. "CohortX" is the provided default for cohort-matching application. See customDatasetServer.

vars

A named list of a variable set (or sets) in the data that is allowed for matching. See details.

guess

Optional, name of the function to call for initial guessing of harmonized variables. See details.

informd

Relative path to the Rmarkdown file, whose contents will be displayed in the modal.

appdata

Optional, the path of one or more files that can be mock-uploaded. See details.

Details

This server function puts together modular components to implement the whole interaction of the matching application with several defaults to facilitate quick startup. Though originally conceived for matching and exploration of patient cohort datasets, this could be adapted to matchable data in other domains, such as geographic sampling sites, etc. This app module can also be viewed as a starting template to help compose a new matching app with a sufficiently different layout or functionality.


avucoh/DIVE documentation built on Aug. 29, 2023, 6:02 p.m.