Skip to contents

Creates a summary data frame based on review data. Creates one row per subject id and form. All events (or visits) of a specific subject id and form will be collapsed into one column separated with a comma, using collapse_column_vals() internally. Used to summarize data in the server, which is then passed to the modules mod_header_widgets_server(), mod_navigate_review_server(), and mod_report_server().

Usage

summarize_review_data(
  data,
  common_vars = c("subject_id", "item_group"),
  event_var = "event_name",
  date_time_vars = "edit_date_time",
  status_var = "status",
  collapse_exclude = "Any visit"
)

Arguments

data

Data frame with review data.

common_vars

A character vector containing the common key variables.

event_var

A character string containing the name of the column with the event names.

date_time_vars

A character vector with the names of the date-time variables. Can be multiple variable names.

status_var

A character vector with the name of the status column.

collapse_exclude

A character vector with the values to be excluded from the column collapse.

Value

A data frame. Required columns are: subject_id, item_group, event_name, edit_date_time, status, reviewed.