Choose model asks the user inside the console for input. Options are Exit, New Model, or one of a list of existing models. If no integer number was presented by the user an ERROR message will be created but no ERROR will be thrown. This way this can be inserted inside a loop.
choose_model(rivermodels)
rivermodels | A list of named models |
---|
Returns the user input as character vector, or an ERROR message.
choose_model(list())#> Exit: 'exit' #> New Model: 'new'Choose one option:#> [1] "ERROR: could not read input \n"#> Exit: 'exit' #> New Model: 'new' #> fake_river_model: '1'Choose one option:#> [1] "ERROR: could not read input \n"