Closed endrebak closed 8 years ago
Exactly like that should not be possible in optparse (should be possible in argparse). However what you could do in optparse do is use a delimiter like ;
and use strsplit
on the options.
Rscript myprogram.r --input="file1.txt;file2.txt" --chip="file3.txt;file4.txt"
Alternatively you could set positional_arguments=TRUE
and put your multiple files as your positional arguments, you'll then get a character vector of four files.
Rscript myprogram.r file1.txt file2.txt file3.txt file4.txt
This SO answer claims that this is not possible: http://stackoverflow.com/a/13811415/992687 , but the answer is old.