Skip to contents

Shifts existing subnatidN columns up by one (subnatid1subnatid2, etc.) then renames subnatidsubnatid1. No-op if no plain subnatid column exists. Called explicitly in dlw_clean.pipmd() before apply_recode_spec() — structural renames that are not variable-level recodes live here, not in the YAML spec.

Usage

shift_subnatid(dt)

Arguments

dt

data.table

Value

dt modified by reference via setnames()