om_gather: Gather OpenMind data

Description Usage Arguments Workflow Examples

Description

This function will turn Assessment data into long format and creates the following variables:

Function takes strings in the form of "Q1P|Q2P" for Pre- and Post Questions 1 & 2

Usage

1
om_gather(.data, which_strings = openmindR::q_c_strings)

Arguments

.data

Assessment data

which_strings

a string indicating which variables should be parsed out (default is openmindR::q_c_strings)

Workflow

om_filter_data -> om_rescale -> om_clean_ppol -> om_construct_measures -> remove_dups -> om_gather

Examples

1
2
3
4
5
6
7
# Turn AffPol1 variable from v7 into long format
assessmentv7 %>%
  om_gather(which_strings = "AffPol1")

# Turn v7 into long format
assessmentv7 %>%
  om_gather(which_strings = v7_var_strings)

openmindplatform/openmindR documentation built on Nov. 13, 2021, 2:13 p.m.