userInput: Gets user input

Description Usage Arguments Value

View source: R/userInput.R

Description

Solicits a response from user depending on the type of question specified. Also writes corresponding progress data to progress file.

Usage

1
2
3
  userInput(question,
    type = c("exact", "range", "text", "command", "multiple"),
    choices = "", correct, hint = "", progress.file.path)

Arguments

question

character string representing the question body

type

character string specifying the type of question

choices

character vector of choices, only specified for question type "multiple"

correct

character string representing the correct answer

hint

character string of hint to be shown to user after incorrect response

progress.file.path

full file path to file where progress is recorded

Value

strikes number of incorrect responses before getting correct response


ncarchedi/swirl_OLD documentation built on May 23, 2017, 11:32 a.m.