Learn R Programming

bayescount (version 0.8.2)

ask: OBTAIN INPUT FROM USER WITH ERROR HANDLING

Description

A simple function to detect input from the user, and keep prompting until a response matching the class of input required is given. Used by the function 'bayescount'.

Usage

ask(prompt="?", type="logical", bounds=c(-Inf, Inf), na.allow=FALSE)

Arguments

See Also

bayescount

Examples

Run this code
#  Ask the user if they want to proceed
ask_yn("Do you want to start the program now?  ", type="logical")

Run the code above in your browser using DataLab