datat.rvectors
index
../datat/rvectors.py

Utility to make R vectors according to type (e.g. a list of integers will be
converted to an IntVector). Python's None is translated to NA in R. Handles
strings, integers, floats and booleans (True/False).
 
Usage example:
rvectors.make_r_vector([1,2,3,7,None])   # --> IntVector, last item NA

 
Modules
       
rpy2.robjects

 
Functions
       
make_r_vector(things)
Return the type of R vector appropriate to the data entered. If data is
mismatched, try to make a StrVector, and failing that, raise a TypeError.
 
If passed a dictionary, will try to turn it into a named vector.