dh.defineCases | R Documentation |
In an analysis you may want to subset your dataset to contain only subjects meeting a specific criteria, e.g. data on at least one outcome or data on all exposures. This function automates this operation by describing whether a subject has non-missing values for any or all of a set of given variables.
dh.defineCases(
df = NULL,
vars = NULL,
type = NULL,
new_obj = NULL,
conns = NULL,
checks = FALSE,
newobj = NULL
)
df |
Character specifying a server-side data frame. |
vars |
Character vector of columns within 'df' to form definition set. |
type |
Character specifying how to define cases. Use "any" to describe subjects with data on any of 'vars', and "all" to describe subjects with data on all of 'vars. |
new_obj |
Character specifying name for created serverside object. |
conns |
DataSHIELD connections object. |
checks |
Logical; if TRUE checks are performed prior to running the function. Default is TRUE. |
newobj |
Retired argument name. Please use ‘new_obj’ instead. |
This function replaces the deprecated dh.subjHasData.
Server-side vector defining whether subject meets criteria defined by 'vars' and 'type'. 1 indicates that criteria were met, 0 indicates that criteria weren't met.
Other descriptive functions:
dh.anyData()
,
dh.classDiscrepancy()
,
dh.createTableOne()
,
dh.getStats()
,
dh.lmTab()
,
dh.meanByGroup()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.