confirmbox: Confirm Data Entry

Description Usage Arguments Examples

View source: R/confirmbox.R

Description

This function provides a user input box in RStudio to confirm a value entered by the user from a previous entry. If the user is not using RStudio, or their version of RStudio is not 1.1.67 or greater, it will use menu() to ask in the console. Because portability.

Usage

1
2
3
4
confirmbox(input, confirm_title = "Confirm Entry",
  confirm_message_a = "You entered",
  confirm_message_b = ". Is this correct?", confirm_ok = "Yes",
  confirm_cancel = "No", ...)

Arguments

input

The value provided by the user from a previous prompt

confirm_title

The title of the input box

confirm_message_a

The part of the message that goes before the input to be verified

confirm_message_b

The part of the message that goes after the input to be verified

confirm_ok

User input option that will return TRUE

confirm_cancel

User input option that will return FALSE

...

Used to handle arguments intended for other functions, as confirmbox() is a helper function

Examples

1
2
x <- showPrompt(title = "Your Name", message = "Please enter your name.", default = "Jerry")
confirmbox(input = x)

spenceredwin/boxit documentation built on Nov. 5, 2019, 9:15 a.m.