/** 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 * @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 */ public boolean[] isNA() { boolean a[] = new boolean[length()]; return a; }
/** 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 * @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 */ public boolean[] isNA() { boolean a[] = new boolean[length()]; return a; }
public String toDebugString() { return super.toDebugString()+"["+length()+"]"; } }
public String toString() { return super.toString()+"["+length()+"]"; }
public String toDebugString() { return super.toDebugString()+"["+length()+"]"; } }
public String toString() { return super.toString()+"["+length()+"]"; }
/** creates a data frame object from a list object using integer row names * @param l a (named) list of vectors ({@link REXPVector} subclasses), each element corresponds to a column and all elements must have the same length * @return a data frame object * @throws REXPMismatchException if the list is empty or any of the elements is not a vector */ public static REXP createDataFrame(RList l) throws REXPMismatchException { if (l == null || l.size() < 1) throw new REXPMismatchException(new REXPList(l), "data frame (must have dim>0)"); if (!(l.at(0) instanceof REXPVector)) throw new REXPMismatchException(new REXPList(l), "data frame (contents must be vectors)"); REXPVector fe = (REXPVector) l.at(0); return new REXPGenericVector(l, new REXPList( new RList( new REXP[] { new REXPString("data.frame"), new REXPString(l.keys()), new REXPInteger(new int[] { REXPInteger.NA, -fe.length() }) }, new String[] { "class", "names", "row.names" }))); }
/** creates a data frame object from a list object using integer row names * @param l a (named) list of vectors ({@link REXPVector} subclasses), each element corresponds to a column and all elements must have the same length * @return a data frame object * @throws REXPMismatchException if the list is empty or any of the elements is not a vector */ public static REXP createDataFrame(RList l) throws REXPMismatchException { if (l==null || l.size()<1) throw new REXPMismatchException(new REXPList(l), "data frame (must have dim>0)"); if (!(l.at(0) instanceof REXPVector)) throw new REXPMismatchException(new REXPList(l), "data frame (contents must be vectors)"); REXPVector fe = (REXPVector) l.at(0); return new REXPGenericVector(l, new REXPList( new RList( new REXP[] { new REXPString("data.frame"), new REXPString(l.keys()), new REXPInteger(new int[] { REXPInteger.NA, -fe.length() }) }, new String[] { "class", "names", "row.names" }))); }