3

I'd like to generate a popup box in R with six inputs.

I prefer to have all the inputs in the same pop-up box because most of the time most will be the default, and I'd like to quickly see at a glance that they are all correct rather than having to click through six popups.

I know dlg_input in the svDialogs package gives a popup box, but I don't see an option to modify it to allow for multiple inputs. Here's the code for dlg_input:

    function (message = "Enter a value", default = "", ..., gui = .GUI) 
 {
    if (!guistartUI("dlginput",call=match.call(),default=default,
        msg="Displayingamodalinputdialogbox",msg.no.ask="Amodalinputdialogboxwasby−passed"))
        return(invisible(gui))
    if(!length(message))
        message<−"Enter a value"
    message<−paste(as.character(message),collapse="\n")
    if(is.null(default)){
        default<−""
    }
    else {
        default<−as.character(default)[1]
    }
    gui$setUI(args = list(message = message, default = default)) 
    UseMethod("dlgInput", gui) 
 }
<environment: namespace:svDialogs>

I assume there's a way to modify this code to give me what I want, but it's lost on me. Any help would be much appreciated.

  • did you try ``select.list`` with ``graphics = T`` and ``multiple = T`` ? – runr Nov 26 '18 at 18:11
  • Hmm, I'm not looking to select items from a list though, I'm looking to create an input dialogue box that allows me to input several values. So, in a single popup box, I want prompts that read things like, "alpha duration in sec," "voltage step in Volts," and "% of peak at start of fit," and I want to be able in one glance to check that the default values are correct for the present case and change them if not. So, it would look something like this: https://imgur.com/a/olSigQ5 – carbontaxfan Nov 26 '18 at 23:46

0 Answers0