extract_units_and_conversions_csv: Extract Units and Conversions CSV

View source: R/01-extract-units.R

extract_units_and_conversions_csvR Documentation

Extract Units and Conversions CSV

Description

Extract all units from a RHoMIS CSV file, and write these unit conversion tables to be a file, which will be verified by the user.

Usage

extract_units_and_conversions_csv(
  base_path = "./",
  file_path,
  id_type = c("string", "column"),
  proj_id,
  form_id,
  unique_id_col = "_uuid",
  hh_id_col = NULL,
  overwrite = F
)

Arguments

base_path

The folder where you want to save any outputs, usually your current working directory ("./")

file_path

Filepath to a RHoMIS Survey CSV

id_type

RHoMIS surveys have form and project IDs. Sometimes the form and project IDs are included as a column in the dataset (id_type="column"), or the IDs are specified by the user at the point of processing (id_type="string")

proj_id

If ID type was string, this should be a string, if ID type was column, this should be a column name containing project IDs

form_id

If ID type was string, this should be a string, if ID type was column, this should be a column name containing form IDs

unique_id_col

The column containing unique household ids. These are designed to be "unique" across merged datasets

hh_id_col

The column containing household ids to use, could be the same as unique_id_col. Household IDs can be linked to older longitudinal surveys when merging datasets.

overwrite

Whether or not to overwrite household ids

Details

Rpackage file: 01-extract-units.R


l-gorman/rhomis-R-package documentation built on Nov. 8, 2023, 6:46 a.m.