Swapped argument order to match MATLAB

This commit is contained in:
Waldir Leoncio 2021-05-20 09:17:08 +02:00
parent 3fd1cac27b
commit 8eb81c51d2
2 changed files with 2 additions and 2 deletions

View file

@ -86,7 +86,7 @@ admix1 <- function(tietue) {
nloci <- size(COUNTS, 2)
ninds <- size(data, 1) / rowsFromInd
answers <- inputdlg('Input number of iterations', 50)
answers <- inputdlg('Input number of iterations', definput=50)
if (isempty(answers)) return()
iterationCount <- as.numeric(answers[1, 1]) # maybe [[]]?

View file

@ -4,7 +4,7 @@
#' @param dims number of dimensions in the answwers
#' @param definput default value of the input
#' @export
inputdlg <- function(prompt, definput=NULL, dims=1) {
inputdlg <- function(prompt, dims=1, definput=NULL) {
if (!is.null(definput)) {
prompt <- append(prompt, paste0(" (default: ", definput, ")"))
}