} else {
each = 1;
}
if(!IntVector.isNA(lengthOut)) {
if(lengthOut < 0) {
throw new EvalException("invalid 'length.out' argument");
}
resultLength = lengthOut;
}
if(times.length() > 1 && each > 1) {
throw new EvalException("invalid 'times' argument");
}
/*
* If there is no per-element times parameter,
* and we have a large vector, then just return