def testMapperPy2R_float(self): py = 1.0 rob = robjects.default_py2ro(py) self.assertTrue(isinstance(rob, robjects.Vector)) self.assertEquals(rinterface.REALSXP, rob.typeof)
def testMapperPy2R_unicode(self): py = u'houba' self.assertTrue(isinstance(py, unicode)) rob = robjects.default_py2ro(py) self.assertTrue(isinstance(rob, robjects.Vector)) self.assertEquals(rinterface.STRSXP, rob.typeof)
def testMapperPy2R_integer(self): py = 1 rob = robjects.default_py2ro(py) self.assertTrue(isinstance(rob, robjects.Vector)) self.assertEquals(rinterface.INTSXP, rob.typeof)
def testMapperPy2R_boolean(self): py = True rob = robjects.default_py2ro(py) self.assertTrue(isinstance(rob, robjects.Vector)) self.assertEquals(rinterface.LGLSXP, rob.typeof)
def testMapperPy2R_complex(self): py = 1.0 + 2j rob = robjects.default_py2ro(py) self.assertTrue(isinstance(rob, robjects.Vector)) self.assertEquals(rinterface.CPLXSXP, rob.typeof)