Python and Rpy2: Calling plot function with options that have "." in them -
I'm just starting to learn how to use rpy2 with python I am capable of making simple plots and similar, but I have participated in this problem that many options in R "." For example, this is an R call that works:
Barplot (T, cola = summer. Collars (2), name. ARR = C ("PNN" , "PNP2"))
Where t is the matrix.
I want to use the same call in the python, but it is part of "Names.arg" I understand that in Python you change "." With "_", for example Name_arg, but he is not working either. I know that this is a basic problem, so I hope someone has seen it and knows exactly. Thanks!
< Div class = "post-text" itemprop = "text">
You can use a dictionary here for named arguments in Docs, and by calling For straightforward tasks, remember also that RPy2 is expecting it, it is a little weird, but on the plus side, you should be able to do anything in RP2 which you can do in R.
< ("PNV", "PNV2")) robbss.r.barplot (t, col = "robotss.color"); robotss.r ("heat .colors") () name = rockets. Color, ** {"names.arg": names})(Note that this is for rpy2 version 2.0.x; There are some changes to which I have yet to see Opportunity not found Land.)
Comments
Post a Comment