Skip to contents

This function prepares and processes data for a Message Component Analysis simulator and exports a config file to be used develop the app.

Usage

prep_shiny_setup_mca(
  attr_dict,
  filter_data,
  model,
  export_path = "config.yml",
  open = FALSE
)

Arguments

attr_dict

A data frame containing attribute metadata with required columns: attribute_label, level_label, display, attribute_name, and level_name.

filter_data

A data frame of demographic data to be used for filters. Result from g6tr.shiny::create_filter_data().

model

Conjoint model. Result from cjt_model().

export_path

A character string specifying the file path for the exported configuration YAML file. Defaults to "config.yml".

open

Logical; if TRUE, opens the generated YAML file in RStudio. Defaults to TRUE.