add_R: Append R to string, if it doesn't end in R already.

View source: R/metadata.R

add_RR Documentation

Append R to string, if it doesn't end in R already.

Description

Use this function to conveniently rename reverse-coded variables, so that they end in R.

Usage

add_R(x)

Arguments

x

a string

Examples

data('bfi')
bfi %>% dplyr::select(BFIK_open_2,BFIK_agree_2) %>% dplyr::rename_at(1, add_R) %>% head()

rubenarslan/codebook documentation built on Nov. 13, 2022, 12:40 p.m.