translateFactors: Function to translate factors from sensata data two different...

View source: R/translateFactors.R

translateFactorsR Documentation

Function to translate factors from sensata data two different languages

Description

This function allows you to create factors with the information from the dictionary to the variables in the microdata. DO NOT USE for NPSor slider questions that have range different than 0-10.

Usage

translateFactors(
  df,
  fromDictionary,
  toDictionary,
  questionPrefix = "q_",
  skipQuestionString = "Saltar pregunta"
)

Arguments

df

data downloaded from Mongo, cleaned with cleanData.R and scrubbed with scrubData.R

fromDictionary

dictionary created using dictGenerator.R in expanded form without screens in the original language

toDictionary

dictionary created using dictGenerator.R in expanded form without screens in the target language

questionPrefix

Character that identifies questions

skipQuestionString

value that represents the skipped questions. By default "Saltar pregunta"

Value

Dataframe with questions in format that is analysis friendly.

Author(s)

Gabriel N. Camargo-Toledo gcamargo@sensata.io

Examples

TBD

SensataUX/sensataDataProg documentation built on April 18, 2023, 3:48 p.m.