get_questionnaire_data: Answer Data of the Questionnaires from a Single Participation

get_questionnaire_dataR Documentation

Answer Data of the Questionnaires from a Single Participation

Description

Takes the log data and the already prepared workflow data from a single participant and returns a single line dataframe with the answer data of included questionnaires.

Usage

get_questionnaire_data(
  json_data,
  project_modules,
  scenario_elements,
  questionnaire_elements,
  rater,
  debug_mode = FALSE
)

Arguments

json_data

The log data for a single participation in form of a json object

project_modules

Dataframe including the running numbers and ids for the project modules

scenario_elements

Dataframe including the codes for all existing scenario elements, which are used in the event list.

questionnaire_elements

Dataframe including the codes for all questionnaire elements, which are used in the event list as well as in the summary results.

rater

Dataframe including the running numbers and ids for the rater in the project

debug_mode

If TRUE the internal hash IDs for the project elements are included and no module specific data is returned.

Value

A dataframe (consisting of one row) including general information for a single participation

Examples

## Not run: 
json_file = "participation_logdata.json"
json_data <- rjson::fromJSON(json_file)
workflow <- get_workflow(json_data, module_specific=TRUE)
questionnaire_data <- get_questionnaire_data(json_data, workflow)

## End(Not run)


LucaOffice/lucar documentation built on Dec. 5, 2023, 5:14 a.m.