throw new UnsupportedOperationException("implement me!");
}
} else if(len != Symbol.MISSING_ARG && len != Symbol.MISSING_ARG) {
double rout = len.asReal();
if(Double.isNaN(rout) || rout <= -0.5) {
throw new EvalException("'length.out' must be a non-negative number");
}
lout = (int) Math.ceil(rout);
}
if(IntVector.isNA(lout)) {
double rfrom = (from == Symbol.MISSING_ARG) ? 1.0 : from.asReal();
double rto = (to == Symbol.MISSING_ARG) ? 1.0 : to.asReal();
double rby = by.asReal();
if(by == Symbol.MISSING_ARG) {
return new Range(rfrom, rto).vector();
} else {
return sequenceBy(from, to, rfrom, rto, rby);
}
} else if (lout == 0) {
return new IntArrayVector();
} else if (one) {
return new Range(1.0, lout).vector();
} else if (by == Symbol.MISSING_ARG) {
double rfrom = from.asReal();
double rto = to.asReal();
if(to == Symbol.MISSING_ARG) {
rto = rfrom + lout - 1;
}
if(from == Symbol.MISSING_ARG) {
rfrom = rto - lout + 1;
}
return sequenceFromTo(rfrom, rto, lout);
} else if (to == Symbol.MISSING_ARG) {
double rfrom = (from == Symbol.MISSING_ARG) ? 1.0 : from.asReal();
return sequenceFrom(lout, rfrom, by.asReal());
} else if (from == Symbol.MISSING_ARG) {
return sequenceTo(lout, to.asReal(), by.asReal());
} else {
throw new EvalException("too many arguments");
}
}