choice_to_factor: choice_to_factor

Description Usage Arguments Value

View source: R/plot_data.R

Description

Cleaned data.frame of question choicses ready for plotting. This function works for regular matrix and multiple choices questions. It calls a SBS matrix specific function if a sbs matrix question is provided

Usage

1
choice_to_factor(df, choice_rev = FALSE)

Arguments

choice_rev

BOOL, whether you want to SWITCH the order of factored choices. REQUIRES factor = TRUE to be set DEFAULT = FALSE

choices_df

choices sub object (DF) pulled from the qsurvey object.

choice_factor

BOOL, whether you want choicse to be a factor or not DEFAULT = FALSE

Value

data.frame of choices ready to be merged with the main question df


earthlab/qtoolkit documentation built on Feb. 3, 2022, 5:57 a.m.