Skip to contents

Renames variables that don't comply with Stata's naming rules:

Usage

bhhi_stata_prep(data)

Arguments

data

A tibble or data frame to prepare for Stata.

Details

Stata names can only contain letters, digits, and underscores. Illegal characters are replaced with underscores.

Stata names can't start with a digit. Names with leading digits are prepended with an underscore.

Stata names can only be 32 characters long. Names are truncated to a maximum of 32 characters.