Codota Logo
RList.at
Code IndexAdd Codota to your IDE (free)

How to use
at
method
in
org.rosuda.REngine.RList

Best Java code snippets using org.rosuda.REngine.RList.at (Showing top 20 results out of 315)

  • Common ways to obtain RList
private void myMethod () {
RList r =
  • Codota IconREngine.REXP rEXP;rEXP.asList()
  • Codota Iconnew RList()
  • Smart code suggestions by Codota
}
origin: org.rosuda.REngine/REngine

public Object get(Object key) {
return at((String)key);
}
origin: net.rforge/REngine

public Object get(Object key) {
return at((String)key);
}
origin: net.rforge/REngine

  public String toDebugString() {
    StringBuffer sb = new StringBuffer(super.toDebugString()+"{");
    int i = 0;
    while (i < payload.size() && i < maxDebugItems) {
      if (i>0) sb.append(",\n");
      sb.append(payload.at(i).toDebugString());
      i++;
    }
    if (i < payload.size()) sb.append(",..");
    return sb.toString()+"}";
  }
}
origin: org.rosuda.REngine/REngine

  public String toDebugString() {
    StringBuffer sb = new StringBuffer(super.toDebugString()+"{");
    int i = 0;
    while (i < payload.size() && i < maxDebugItems) {
      if (i>0) sb.append(",\n");
      sb.append(payload.at(i).toDebugString());
      i++;
    }
    if (i < payload.size()) sb.append(",..");
    return sb.toString()+"}";
  }
}
origin: net.rforge/REngine

  public String toDebugString() {
    StringBuffer sb = new StringBuffer(super.toDebugString()+"{");
    int i = 0;
    while (i < payload.size() && i < maxDebugItems) {
      if (i>0) sb.append(",\n");
      String name = payload.keyAt(i);
      if (name!=null) sb.append(name+"=");
      sb.append(payload.at(i).toDebugString());
      i++;
    }
    if (i < payload.size()) sb.append(",..");
    return sb.toString()+"}";
  }
}
origin: org.rosuda.REngine/REngine

  public String toDebugString() {
    StringBuffer sb = new StringBuffer(super.toDebugString()+"{");
    int i = 0;
    while (i < payload.size() && i < maxDebugItems) {
      if (i>0) sb.append(",\n");
      String name = payload.keyAt(i);
      if (name!=null) sb.append(name+"=");
      sb.append(payload.at(i).toDebugString());
      i++;
    }
    if (i < payload.size()) sb.append(",..");
    return sb.toString()+"}";
  }
}
origin: org.rosuda.REngine/REngine

/** retrieve an attribute of the given name from this object
 * @param name attribute name
 * @return attribute value or <code>null</code> if the attribute does not exist */
public REXP getAttribute(String name) {
  final REXPList a = _attr();
  if (a==null || !a.isList()) return null;
  return a.asList().at(name);
}

origin: net.rforge/REngine

/** retrieve an attribute of the given name from this object
 * @param name attribute name
 * @return attribute value or <code>null</code> if the attribute does not exist */
public REXP getAttribute(String name) {
  final REXPList a = _attr();
  if (a==null || !a.isList()) return null;
  return a.asList().at(name);
}

origin: IQSS/dataverse

if (directoryNames.at("parent") != null) {
  mParent = directoryNames.at("parent").asString();
} else {
  LOG.fine("WARNING: directoryNames at \"parent\" is null!");
origin: org.rosuda.REngine/REngine

/** checks whether this obejct has a given attribute
 * @param name attribute name
 * @return <code>true</code> if the attribute exists, <code>false</code> otherwise */
public boolean hasAttribute(String name) {
  final REXPList a = _attr();
  return (a!=null && a.isList() && a.asList().at(name)!=null);
}

origin: net.rforge/REngine

/** checks whether this obejct has a given attribute
 * @param name attribute name
 * @return <code>true</code> if the attribute exists, <code>false</code> otherwise */
public boolean hasAttribute(String name) {
  final REXPList a = _attr();
  return (a!=null && a.isList() && a.asList().at(name)!=null);
}

origin: net.rforge/REngine

public void putAll(RList t) {
if (t == null) return;
RList l = (RList) t;
if (names==null) {
  addAll(l);
  return;
}
int n = l.size();
int i = 0;
while (i < n) {
  String key = l.keyAt(i);
  if (key == null)
  add(l.at(i));
  else
  put(key, l.at(i));
  i++;
}
}

origin: org.rosuda.REngine/REngine

public void putAll(Map t) {
if (t==null) return;
// NOTE: this if branch is dead since RList cannot inherit from Map
if (t instanceof RList) { // we need some more sophistication for RLists as they may have null-names which we append
  RList l = (RList) t;
  if (names==null) {
  addAll(l);
  return;
  }
  int n = l.size();
  int i = 0;
  while (i < n) {
  String key = l.keyAt(i);
  if (key==null)
    add(l.at(i));
  else
    put(key, l.at(i));
  i++;
  }
} else {
  Set ks = t.keySet();
  Iterator i = ks.iterator();
  while (i.hasNext()) {
  Object key = i.next();
  put(key, t.get(key));
  }
}
}
origin: net.rforge/REngine

public void putAll(Map t) {
if (t==null) return;
// NOTE: this if branch is dead since RList cannot inherit from Map
if (t instanceof RList) { // we need some more sophistication for RLists as they may have null-names which we append
  RList l = (RList) t;
  if (names==null) {
  addAll(l);
  return;
  }
  int n = l.size();
  int i = 0;
  while (i < n) {
  String key = l.keyAt(i);
  if (key==null)
    add(l.at(i));
  else
    put(key, l.at(i));
  i++;
  }
} else {
  Set ks = t.keySet();
  Iterator i = ks.iterator();
  while (i.hasNext()) {
  Object key = i.next();
  put(key, t.get(key));
  }
}
}
origin: org.rosuda.REngine/REngine

public void putAll(RList t) {
if (t == null) return;
RList l = (RList) t;
if (names==null) {
  addAll(l);
  return;
}
int n = l.size();
int i = 0;
while (i < n) {
  String key = l.keyAt(i);
  if (key == null)
  add(l.at(i));
  else
  put(key, l.at(i));
  i++;
}
}

origin: org.rosuda.REngine/REngine

/** returns dimensions of the object (as determined by the "<code>dim</code>" attribute)
 * @return an array of integers with corresponding dimensions or <code>null</code> if the object has no dimension attribute */
public int[] dim() {
  try {
    return hasAttribute("dim")?_attr().asList().at("dim").asIntegers():null;
  } catch (REXPMismatchException me) {
  }
  return null;
}

origin: net.rforge/REngine

/** returns dimensions of the object (as determined by the "<code>dim</code>" attribute)
 * @return an array of integers with corresponding dimensions or <code>null</code> if the object has no dimension attribute */
public int[] dim() {
  try {
    return hasAttribute("dim")?_attr().asList().at("dim").asIntegers():null;
  } catch (REXPMismatchException me) {
  }
  return null;
}

origin: org.nuiton/nuiton-j2r

REXP tempREXP = dataList.at(i);
Object convertedREXP = convertResult(tempREXP);
origin: org.rosuda.REngine/REngine

/** 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"
                    })));
}
origin: net.rforge/REngine

/** 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"
                    })));
}

org.rosuda.REngineRListat

Popular methods of RList

    Popular in Java

    • Start an intent from android
    • setContentView (Activity)
    • getApplicationContext (Context)
    • getExternalFilesDir (Context)
    • BufferedWriter (java.io)
      Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
    • IOException (java.io)
      Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
    • HttpURLConnection (java.net)
      An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
    • Collections (java.util)
      This class consists exclusively of static methods that operate on or return collections. It contains
    • Get (org.apache.hadoop.hbase.client)
      Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
    • Join (org.hibernate.mapping)
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now