createExtendedDict: Function to extend dictionary for dashboard matrices, like...

View source: R/dashboardElements.R

createExtendedDictR Documentation

Function to extend dictionary for dashboard matrices, like tableau

Description

This function creates an extend dictionary with the info needed for a dashboard matrix

Usage

createExtendedDict(
  dict,
  questions,
  disag,
  labels,
  topic,
  comments = NULL,
  abbrev = NULL
)

Arguments

dict

dictionary from dictGenerator

questions

vector of variables (question identifiers) that should be kept from the dictionary

disag

vector of variables (question identifiers) that will be on the cols of the tableau matrices, the disaggregations

labels

labels for the disag variables

topic

vector of topics for each question

comments

(optional) vector of comment for each question, default NULL

abbrev

(optional) vector of abbreviated text for questions, default NULL

Value

extended dictionary

Author(s)

Gabriel N. Camargo-Toledo gcamargo@sensata.io

Examples

rawData <- sensataDataProg::sensataExample
Dict <- dictGenerator(
  df = rawData,
  questionPrefix = "",
  forceOrdered = "q_AB_NI_01")
questions <- c("q_AB_NI_01", "q_AB_EA_07", "q_AB_RA_01")
disag <- c("q_AB_CA_07", "q_AB_CA_09")
labels <- c("Marital status", "Student")
topic <- c("TEMA 1", "TEMA 2", "TEMA 2")
createExtendedDict(dict = Dict,
                   questions = questions,
                   disag = disag,
                   labels = labels,
                   topic = topic)

SensataUX/sensataDataAnalysis documentation built on May 11, 2023, 10:59 a.m.