ask_question: Ask the user a question or multiple questions

Description Usage Arguments Examples

View source: R/testing_ask_question.R

Description

Ask the user a question or multiple questions

Usage

1
2
3
4
5
ask_question(
  index = NA,
  visible = TRUE,
  question_and_responses = QUESTIONS_AND_RESPONSES
)

Arguments

index

Integer representing the question number as defined by the user in 'question_and_reponses'

visible

Boolean to toggle visibility of the question and response entities

question_and_responses

list of evaluation question lists composed of a 'question', 'answerOne', 'answerTwo', 'answerThree', and an 'answerFour'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
evaluation_questions <- list(
list(question = "Did you enjoy this experiment?", answerOne = "Very much", answerTwo = "Yes", #' answerThree = "A little", answerFour = "No"),
list(question = "On a scale of 1-4, how would you rate your experience?", answerOne = "1",  
answerTwo = "2", answerThree = "3", answerFour = "4")
)

ask_question(1)
ask_question(2)
ask_question(1, FALSE) # hide question/responses
ask_question(1, TRUE, evaluation_questions)
                 

MilesMcBain/r2vr documentation built on March 29, 2021, 12:03 p.m.