mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
855009af7f
The data sampling is done in node and the data processing is done in R. Only plyr was added as an R dependency and it is fairly standard. PR-URL: https://github.com/nodejs/node/pull/7094 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Anna Henningsen <anna@addaleax.net>
25 lines
494 B
R
25 lines
494 B
R
|
|
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;
|
|
}
|
|
}
|