map_names: Append user-friendly section and variable names

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

map_namesR Documentation

Append user-friendly section and variable names

Description

Appends columns "step" and "label", which corresponds with "section" and "variable". Map via lookup_table and fix missing step/label.

Usage

map_names(data, lookup_table, complete = TRUE)

Arguments

data

Dataframe with columns "section", "variable", and "exp_num".

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.


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