# Path: dynts/exc.py
# class MissingPackage(NotAvailable):
#     pass


from datetime import date, datetime
from rpy2 import rinterface
from rpy2.robjects import r, numpy2ri
from ...exc import MissingPackage

# COLLECTIONS OF UTILITIES FOR USING R WITHIN PYTHON
#
#




def loadlib(lib):
    try:
        r('library(%s)' % lib)
    except rinterface.RRuntimeError:
        raise MissingPackage('R library %s not installed. From R shell type\n\ninstall.packages("%s")' % (lib,lib))


class rpyobject:
    _robj = None
    libraries = []
    scripts = []

    def __new__(cls, *args, **kwargs):

# Path: dynts/exc.py
# class MissingPackage(NotAvailable):
#     pass


# Path: dynts/backends/r/utils.py
from datetime import date, datetime
from rpy2 import rinterface
from rpy2.robjects import r, numpy2ri
from ...exc import MissingPackage

# COLLECTIONS OF UTILITIES FOR USING R WITHIN PYTHON
#
#




def loadlib(lib):
    try:
        r('library(%s)' % lib)
    except rinterface.RRuntimeError:
        raise MissingPackage('R library %s not installed. From R shell type\n\ninstall.packages("%s")' % (lib,lib))


class rpyobject:
    _robj = None
    libraries = []
    scripts = []

    def __new__(cls, *args, **kwargs):

        obj = super().__new__(cls)
