2013-03-07 18 views
0

當我嘗試使用gplot2.geom_dotplot我得到的錯誤:geom_dotplot in rpy2?

AttributeError: 'module' object has no attribute 'geom_dotplot' 

,這種功能在Rpy2不同的名字?謝謝。

回答

1

該函數的映射只是丟失。這是rpy2的一個bug。修補程序很快就會在庫中(將在2.3.4版本中發佈)。

同時解決方法可以是添加如下代碼:

from rpy2.robjects.lib import ggplot2 

class GeomDotplot(ggplot2.Geom): 
    _constructor = ggplot2.ggplot2_env['geom_dotplot'] 
ggplot2.geom_dotplot = GeomDotplot.new