formatQuestion: Format a MTurk qualification test question

View source: R/formatQuestion.R

formatQuestionR Documentation

Format a MTurk qualification test question

Description

formatQuestion formats the XML code required to make a pairwise comparison question for a MTurk qualification test.

Usage

formatQuestion(
  question_list,
  question_number,
  question_prompt,
  is_image = FALSE,
  test_question = FALSE
)

Arguments

question_list

A list object where the first and second element contain the left and right comparison text, respectively, and the third element contains an integer corresponding to the index of the correct choice.

question_number

An integer referencing the question number as it appears in the MTurk qualification test.

question_prompt

A string containing the common question prompt used across all pairwise comparison questions.

is_image

A logical where TRUE will cause the first two question_list elements to be treated as images for formatting purposes. FALSE is default and treats the first two question_list elements as html-formatted text.

test_question

A logical where FALSE indicates that the question is a practice question and TRUE indicates that the question is a test question.

Details

The function automatically formats the XML code required to make a generic pairwise comparison question for an MTurk qualification test.

Value

A string of XML code that constructs a question for an MTurk qualification test.

Author(s)

Ryden Butler


RydenButler/labelR documentation built on May 9, 2023, 5:52 a.m.