scan2 {grand} | R Documentation |
Restricts scan()
input to a specified format
Description
Restricts scan()
input to a specified format
Usage
scan2(prompt, type)
Arguments
prompt |
string: prompt for user input |
type |
string: required format for input |
Value
user input in specified format
Examples
character <- scan2(prompt = "Type any character", type = "character")
numeric <- scan2(prompt = "Type any number", type = "numeric")
integer <- scan2(prompt = "Type any number", type = "integer")
custom <- scan2(prompt = "Yes or No?", type = c("Y","N"))
[Package grand version 0.9.0 Index]