merge_original_and_other_units: Merge original and other units

View source: R/DataReformatting.R

merge_original_and_other_unitsR Documentation

Merge original and other units

Description

Many of the RHoMIS variables come from multiple select, with the option to specify "other" by free-text entry. This function allows you to bring the "other" category into the main column, facilitating analysis.

Usage

merge_original_and_other_units(data, main_column, other_column, loop_structure)

Arguments

data

The data you would like to convert

main_column

The main column you would like to add the "other" options

other_column

The name of the "other" column where you would like to integrate your values

loop_structure

Whether or not the "other" columns you are converting come in a loop, or whether it is simple a pair of columns

Details

Rpackage file: DataReformatting.R


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