collapse_var {smarter}R Documentation

collapse_var

Description

Collapse a subset of values within a vector into a new value

Usage

collapse_var(ORIG_VAR, ORIG_VALUES, NEW_VALUE)

Arguments

ORIG_VAR

The input vector

ORIG_VALUES

A subset of values from the input vector to be collapsed

NEW_VALUE

The new value to replace ORIG_VALUES in ORIG_VAR

Value

A character or numeric vector


[Package smarter version 1.0.1 Index]