Create Table with continuous data.
Usage
# S3 method for class 'continuous'
create_table(
data,
name_column = "item_name",
value_column = "item_value",
unit_column = "item_unit",
explanation_column = "reason_notdone",
keep_vars = c("subject_id", "event_name"),
expected_columns = NULL,
...
)
Arguments
- data
A data frame to convert, in long format.
- name_column
Character string. Column that contains all the names for the wide table format.
- value_column
Character string. Column that contains all the values of the table in wide format.
- unit_column
Character vector. The name of the column that contains units (as character values).
- explanation_column
Character vector. The name of the column that contains an explanation why a value is missing (if available).
- keep_vars
all common variables that identify a unique single data row.
- expected_columns
A character vector with the names of the expected variables. Needed to make sure that all expected columns are always created, even if some variables are implicitly missing (which might occur if there are not yet any values available for a specific variable). Also, implicitly missing variables might give errors if part of the script relies on the variables' presence.
- ...
Other options. Currently unused.