Skip to contents

Ensures the input is a data.table, parses the survey_id into individual attributes, and assigns the PIP S3 class via pipload::as_pip().

Usage

data_to_dt(dt, survey_id)

Arguments

dt

A data.frame or data.table of survey micro-data.

survey_id

Character scalar. The survey identifier string (e.g., "ALB_2012_LSMS_V01_M_V01_A_PIP_ALL").

Value

A data.table with PIP class and survey-ID attributes.