process_submissions: Process submissions

View source: R/data-gather-clean.R

process_submissionsR Documentation

Process submissions

Description

Process JSON files into a single table containing all submissions. Cleans up the data to provide user-friendly variable and section names, and remove the 'metadata' section.

Usage

process_submissions(submissions, lookup_table, complete = TRUE)

Arguments

submissions

A named list of paths to JSON files, i.e. the output of [get_submissions()]. The name of each element should be its form data ID.

lookup_table

Dataframe with columns "section", "step", "variable" , and "label" used for user-friendly section and variable display. "step" maps desired "section" names. "label" maps desired "variable" names.

complete

If 'TRUE', will join in all section and variable names that were not provided as part of the submission. If 'FALSE', will only return the data that was present in the JSON file.

Value

A data frame containing the combined responses for all submissions provided to the 'submissions' argument


Sage-Bionetworks/stopadforms documentation built on Aug. 31, 2024, 11:53 p.m.