sm_replace: Fixes survey monkey piping

Description Usage Arguments

View source: R/sm_replace.R View source: R/sm_replace_c.R

Description

Given a set of data from survey monkey, this function will search for all instances of pipes (e.g., Q2 ) and replace these pipes with answers from the corresponding questions (i.e., the answer for Q2).

Usage

1
2
sm_replace(data, data_start = 1, subject_column = "Subject",
  brackets = c("[", "{"))

Arguments

data

A dataframe or datatable containing survey moneky data.

data_start

Column where the actual data start. Should be 1, unless there are surevey monkey data columns that do not pertain to questions.

subject_column

Subject id variable.

brackets

Signifier for survey monkey piping. The old format uses square brackets, and new format uses curly braces.


jasongullifer/convenience documentation built on May 21, 2019, 10:31 a.m.