Package adams.core
Class RObjectInspector
- java.lang.Object
-
- adams.core.RObjectInspector
-
public class RObjectInspector extends Object
Helper class for inspection R objects (SEXP).- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected static adams.core.logging.Logger
LOGGER
for logging errors etc.
-
Constructor Summary
Constructors Constructor Description RObjectInspector()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.renjin.sexp.SEXP
get(org.renjin.sexp.SEXP robj, RObjectPath path)
Returns the object associated with the path.protected static adams.core.logging.Logger
getLogger()
Returns the logger instance to use.protected static List<RObjectPath>
list(RObjectPath parent, org.renjin.sexp.SEXP robj)
Returns the paths for all objects in the provided object.static List<RObjectPath>
list(org.renjin.sexp.SEXP robj)
Returns the paths for all objects in the provided object.static void
main(String[] args)
-
-
-
Method Detail
-
getLogger
protected static adams.core.logging.Logger getLogger()
Returns the logger instance to use.- Returns:
- the logger
-
list
protected static List<RObjectPath> list(RObjectPath parent, org.renjin.sexp.SEXP robj)
Returns the paths for all objects in the provided object.- Parameters:
parent
- the parent path, use null for rootrobj
- the R object to inspect- Returns:
- the object paths
-
list
public static List<RObjectPath> list(org.renjin.sexp.SEXP robj)
Returns the paths for all objects in the provided object.- Parameters:
robj
- the R object to inspect- Returns:
- the object paths
-
get
public static org.renjin.sexp.SEXP get(org.renjin.sexp.SEXP robj, RObjectPath path)
Returns the object associated with the path.- Parameters:
robj
- the R object to extract the object frompath
- the path for the object to extract- Returns:
- the object, null if failed to locate
-
-