varname_label: varname_label

Description Usage Arguments Details

View source: R/varname_label.R

Description

Renames variables based on text parsed from a data key.

Usage

1
varname_label(vargrp, label, pattern, key = FALSE)

Arguments

vargrp

String pattern to rename, renames all variables with this pattern in them.

label

A string common label to preface the new variable name with.

pattern

A string section to be removed from labels in the data key, such that any remaining text is added to the variable name.

key

True returns the renamed data key, false returns the data. Defaults to false.

Details

Renames variables by parsing text from descriptions of the variable. Must be in the format of a data frame (named datakey) with variables matching the data set (named data), and containing only a single string. Intended to work with Qualtrics' output of question text.


alexisblackbird/personal.utilities documentation built on May 3, 2019, 9:36 p.m.