/** 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() { StringBuffer sb = new StringBuffer(super.toDebugString()+"{"); int i = 0; while (i < payload.length && i < maxDebugItems) { if (i>0) sb.append(","); sb.append(payload[i]); i++; } if (i < payload.length) sb.append(",.."); return sb.toString()+"}"; } }
public String toString() { return super.toString()+(asList().isNamed()?"named":""); }
/** * * @param input * inputstring * @return Rdata */ public double[] eDblArr(final String input) { final double[] resultOnFailure = new double[0]; try { final Object evaluationResult = this.evalWithR(input); final REXPVector vectorResult = (REXPVector) evaluationResult; return vectorResult.asDoubles(); } catch (final REXPMismatchException e) { return resultOnFailure; } catch (final InvalidREvaluationResultException e) { RBridgeControl.LOGGER.error(e.getMessage(), e); return resultOnFailure; } }
public String toString() { return super.toString()+(asList().isNamed()?"named":""); }
/** * * @param input * inputstring * @return Rdata */ public double[] eDblArr(final String input) { final double[] resultOnFailure = new double[0]; try { final Object evaluationResult = this.evalWithR(input); final REXPVector vectorResult = (REXPVector) evaluationResult; return vectorResult.asDoubles(); } catch (final REXPMismatchException e) { return resultOnFailure; } catch (final InvalidREvaluationResultException e) { RBridgeControl.LOG.error(e.getMessage(), e); return resultOnFailure; } }
public String toDebugString() { StringBuffer sb = new StringBuffer(super.toDebugString()+"{"); int i = 0; while (i < payload.length && i < maxDebugItems) { if (i>0) sb.append(","); sb.append("\""+payload[i]+"\""); i++; } if (i < payload.length) sb.append(",.."); return sb.toString()+"}"; } }
/** 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 toString() { return super.toString()+(asList().isNamed()?"named":""); }
public String toDebugString() { StringBuffer sb = new StringBuffer(super.toDebugString()+"{"); int i = 0; while (i < payload.length && i < maxDebugItems) { if (i>0) sb.append(","); sb.append((payload[i] == NA) ? "NA" : ((payload[i] == FALSE) ? "FALSE" : "TRUE")); i++; } if (i < payload.length) sb.append(",.."); return sb.toString()+"}"; } }
public String toString() { return super.toString()+"["+length()+"]"; }
public String toString() { return super.toString()+(asList().isNamed()?"named":""); }
public String toDebugString() { StringBuffer sb = new StringBuffer(super.toDebugString()+"{"); int i = 0; while (i < payload.length && i < maxDebugItems) { if (i>0) sb.append(","); sb.append((payload[i] == NA) ? "NA" : ((payload[i] == FALSE) ? "FALSE" : "TRUE")); i++; } if (i < payload.length) sb.append(",.."); return sb.toString()+"}"; } }
public String toDebugString() { return super.toDebugString()+"["+length()+"]"; } }
public String toDebugString() { StringBuffer sb = new StringBuffer(super.toDebugString()+"{"); int i = 0; while (i < payload.length && i < maxDebugItems) { if (i>0) sb.append(","); sb.append(payload[i]); i++; } if (i < payload.length) sb.append(",.."); return sb.toString()+"}"; }
public String toDebugString() { return super.toDebugString()+"["+length()+"]"; } }
public String toDebugString() { StringBuffer sb = new StringBuffer(super.toDebugString()+"{"); int i = 0; while (i < payload.length && i < maxDebugItems) { if (i>0) sb.append(","); sb.append(payload[i]); i++; } if (i < payload.length) sb.append(",.."); return sb.toString()+"}"; } }
public String toString() { return super.toString()+"["+length()+"]"; }
public String toDebugString() { StringBuffer sb = new StringBuffer(super.toDebugString()+"{"); int i = 0; while (i < payload.length && i < maxDebugItems) { if (i>0) sb.append(","); sb.append(payload[i]); i++; } if (i < payload.length) sb.append(",.."); return sb.toString()+"}"; }
/** 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" }))); }