Skip to contents

case_when function case_when_vars completes case_when evaluation and returns a new variable

Usage

case_when_vars(raw, scoresheet)

Arguments

raw

a raw data object

scoresheet

a properly formatted scoresheet object. Key columns that must have data for a case_when function are new_var and code. Code should be formatted in accordance with dplyr case_when input. See case_when

Value

appends new_var column after evaluation of case_when statements in code column of scoresheet