split_form function

Creation of a data frame with variables of a specified form

Creation of a data frame with variables of a specified form

Function that given the data, the dictionary and the mapping between forms and events it creates a nested dataset containing all the datasets having only the variables in each form. It can be chosen to return only the data from the specified form

split_form(data, dic, event_form = NULL, which = NULL, wide = FALSE)

Arguments

  • data: Data frame containing data from REDCap.
  • dic: Data frame containing the dictionary read from REDCap.
  • event_form: Data frame containing the correspondence of each event with each form.
  • which: Specify a form if only data for the desired form is wanted.
  • wide: If the dataset needs to be in a wide format or not (long).