Package adams.core

Class RObjectInspector


  • public class RObjectInspector
    extends Object
    Helper class for inspection R objects (SEXP).
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • LOGGER

        protected static adams.core.logging.Logger LOGGER
        for logging errors etc.
    • Constructor Detail

      • RObjectInspector

        public RObjectInspector()
    • 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 root
        robj - 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 from
        path - the path for the object to extract
        Returns:
        the object, null if failed to locate