예제 #1
0
 def testMapperPy2R_float(self):
     py = 1.0
     rob = robjects.default_py2ro(py)
     self.assertTrue(isinstance(rob, robjects.Vector))
     self.assertEquals(rinterface.REALSXP, rob.typeof)
예제 #2
0
 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)
예제 #3
0
 def testMapperPy2R_integer(self):
     py = 1
     rob = robjects.default_py2ro(py)
     self.assertTrue(isinstance(rob, robjects.Vector))
     self.assertEquals(rinterface.INTSXP, rob.typeof)
예제 #4
0
 def testMapperPy2R_boolean(self):        
     py = True
     rob = robjects.default_py2ro(py)
     self.assertTrue(isinstance(rob, robjects.Vector))
     self.assertEquals(rinterface.LGLSXP, rob.typeof)
예제 #5
0
 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)