Learn R Programming

Xmisc (version 0.2.1)

raw_input: Input from the terminal (in interactive use)

Description

Input from the terminal (in interactive use), confined by choice if provided.

Usage

raw_input(msg = "", choice, strip = TRUE)

Arguments

msg
character, a message to input
choice
character, choices to confine the input
strip
logical, whether to strip trailing spaces of the input

Value

character

Examples

Run this code
## Not run: 
# raw_input("Please enter user name: ")
# raw_input("Please confirm",choice=c("yes","no"))
# ## End(Not run)

Run the code above in your browser using DataLab