1 package org.rosuda.REngine;
3 /** abstract class representing all vectors in R */
4 public abstract class REXPVector extends REXP {
5 public REXPVector() { super(); }
7 public REXPVector(REXPList attr) {
11 /** returns the length of the vector (i.e. the number of elements)
12 * @return length of the vector */
13 public abstract int length();
15 public boolean isVector() { return true; }
17 /** returns a boolean vector of the same length as this vector with <code>true</code> for NA values and <code>false</code> for any other values
18 * @return a boolean vector of the same length as this vector with <code>true</code> for NA values and <code>false</code> for any other values */
19 public boolean[] isNA() {
20 boolean a[] = new boolean[length()];
24 public String toString() {
25 return super.toString()+"["+length()+"]";
28 public String toDebugString() {
29 return super.toDebugString()+"["+length()+"]";