get_choices_sbs: FUN: get_choices_sbs

Description Usage Arguments Value

View source: R/sbs_funs.R

Description

This function is specific for side by side (SBS) matrices. SBS matrices have a col column which dilineates the sub matrix that the question choicses are in Some use cases will have the same choicses in each submatrix. Others will have different choices making the work flow more complex

Usage

1
2
3
4
5
6
get_choices_sbs(
  choices_df,
  choice_wrap = NULL,
  choice_factor = FALSE,
  choice_rev = FALSE
)

Arguments

choices_df

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

choice_wrap

int - the number of characters at which you want to wrap a line, DEFAULT = NULL

choice_factor

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

choice_rev

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

Value

data.frame of choices ready to be merged with the main question df with ordered factors applied if selected


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