dataHelperServer | R Documentation |
Traverse data in "right-hand" and "left-hand" tables
dataHelperServer(
id,
dbcon = NULL,
lhdata,
lhdatakey,
rhdata,
rhdatakey,
handler,
functionality = "filter"
)
id |
Character ID for specifying namespace, see |
dbcon |
A database connection object to the database containing the required tables. |
lhdata |
Name of the table on the left-hand side. |
lhdatakey |
Name of key column in |
rhdata |
Name of the table on the right-hand side. |
rhdatakey |
Name of key column in |
handler |
Name of table used for translating between |
functionality |
Either "filter" or "select" for the intended behavior of module, defaulting to the first. See details. |
Implements simple interface allowing constrained browsing, filtering, subsetting of traditional tabular data. The module requires these tables:
lhdata
"Left-hand" table of data. Conceptually, also known as a "dimension table". For example, a table of unique patients and attributes such as age, sex, race, etc.
rhdata
"Right-hand" table of data. Conceptually, also known as a "dimension table". For example, a table of unique diagnoses and attributes such as description, insurance code, etc.
handler
Lookup table to translate relations between the left-hand and right-hand tables. Using current example, a table linking patient IDs to diagnosis IDs (which can be many-to-many). See helpful reference for bridge table
.
There can be some nuance to the intended functionality: one table acts as a constraint filter to limit the results in the second table, or one table acts as an entryway to show linked results in the second table. The difference boils down to whether the second table shows all possible results if nothing is selected in the first ("filter" functionality type) or the second table shows nothing if nothing is selected in the first ("select" functionality type).
Other dataHelper:
dataHelperUI()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.