【发布时间】:2013-02-22 01:29:03
【问题描述】:
当我尝试使用 gplot2.geom_dotplot 时出现错误:
AttributeError: 'module' object has no attribute 'geom_dotplot'
这个函数在 Rpy2 中有不同的名字吗?谢谢。
【问题讨论】:
当我尝试使用 gplot2.geom_dotplot 时出现错误:
AttributeError: 'module' object has no attribute 'geom_dotplot'
这个函数在 Rpy2 中有不同的名字吗?谢谢。
【问题讨论】:
只是缺少该函数的映射。这是 rpy2 的一个错误。该修复程序将很快在存储库中(将与版本 2.3.4 一起发布)。
与此同时,可以将以下内容添加到您的代码中。:
from rpy2.robjects.lib import ggplot2
class GeomDotplot(ggplot2.Geom):
_constructor = ggplot2.ggplot2_env['geom_dotplot']
ggplot2.geom_dotplot = GeomDotplot.new
【讨论】: