menu2: menu-like function for interactive or non-interactive...

View source: R/menu2.R

menu2R Documentation

Description

return NA if the user inserted the usual 0 to exit

Usage

menu2(
  choices,
  title = NULL,
  multiple = FALSE,
  return = c("values", "indexes"),
  strict = FALSE
)

Arguments

title

optional

multiple

can more than one item be selected?

return

what to return values (selected choiches given, by default), or indexes. If only 0 is selected (to exit), NA is returned

strict

allow only selectable index to be choosen

choiches

vector of possible choiches


lbraglia/lbmisc documentation built on April 29, 2024, 11:27 a.m.