throw new EvalException("It's not an AtomicVector", value.getTypeName());
} else if(value.length() < 1) {
//to keep its type info
return new Boolean[0];
}
LogicalVector lv= (LogicalVector)value;
int length = lv.length();
Boolean[] values = new Boolean[length];
for(int i=0;i<length;i++){
values[i]= lv.getElementAsObject(i);
}
return values;
}