make_dummies: Function that converts a multiple choice CES question into a...

View source: R/multiple_choice_dummies.R

make_dummiesR Documentation

Function that converts a multiple choice CES question into a dummy matrix of individual answers

Description

Function that converts a multiple choice CES question into a dummy matrix of individual answers

Usage

make_dummies(data, variable, prefix)

Arguments

data

The data to use. Not in quotes.

variable

The variable with the multiple choice answers. In quotes.

prefix

The prefix to use for the column names of the dummy matrix. In quotes.

Value

A data frame of the same length as the data frame passed as argument. Has as many columns as there are unique answers in the variable to review.


SCIFoundation/sciCoverageR documentation built on Oct. 31, 2024, 11:45 p.m.