numeric_only | R Documentation |
Unless a vector of variables/field names is passed to the
fields
argument, the fields to be analyzed will be guessed based on
column type. Furthermore, all non-numeric data will be removed before analysis.
If mixed numeric/non-numeric data (e.g. "160 cm") are passed, the first numerical
instance will be extracted from the data. A long format dataframe is returned.
This is an internal function only.
numeric_only(
record_data,
data_dict = getOption("redcap_bundle")$data_dict,
sex_var = NA,
fields = NULL,
long_format = TRUE,
drop_message = TRUE
)
record_data |
Dataframe. Records data export from REDCap. For the purposes of this function, only quantitative data will be kept. |
data_dict |
Dataframe. REDCap project data data_dictionary. By default,
$data_dict is expected in the REDCap bundle option, as created by
|
sex_var |
String. Name of variable indicating the sex of subjects. If included, it will be used as one of the melting factors. |
fields |
Character. A vector of field/variable names to be analyzed may be passed manually. |
long_format |
Logical. Determines whether the returned dataframe will
be in long or wide format. Default is |
drop_message |
Logical. Determine if a message is shown to the user about dropping non-numerical data |
Marcus Lehr
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.