prepare_extended_col | R Documentation |
There were multiple-choice questions wherein more than one option was permissible i.e. check-list kind of questions. These questions needed to be brought together into a single variable at some point in the analysis. After this was done, these options were brought together into a list column. This function will expand that list column, creating new columns - one for each response.
prepare_extended_col( data, variable, options, multisectoral = TRUE, notReferral = multisectoral )
data |
A data frame that contains the column to be collapsed |
variable |
A character vector of length 1 representing the name of the column to be extended |
options |
The would-be levels of the resulting factor column i.e. the question's values as they are to appear in a new factor. |
multisectoral |
Logical. Whether work is on a combined data frame i.e. the question cuts across various sectors of the analysis e.g. health, legal aid, etc. |
notReferral |
Logical. Whether not Referral Directory data |
A modified data frame with the choices now appearing as levels of a factor.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.