Sha256: 9a391df440d7df54b7d0cd1102b35e7ed48777190b35c7315ca947e4a21c0711
Contents?: true
Size: 494 Bytes
Versions: 4
Compression:
Stored size: 494 Bytes
Contents
args = commandArgs(TRUE); args.options = list(); temp.option.key = NULL; for (arg in args) { # Optional arguments declaration if (substring(arg, 1, 1) == '-') { temp.option.key = substring(arg, 2); if (substring(arg, 2, 2) == '-') { temp.option.key = substring(arg, 3); } args.options[[temp.option.key]] = TRUE; } # Optional arguments value else if (!is.null(temp.option.key)) { args.options[[temp.option.key]] = arg; temp.option.key = NULL; } }
Version data entries
4 entries across 4 versions & 1 rubygems