ggplot2的最新版本不适用于rpy2

时间:2019-08-07 14:10:43

标签: python ggplot2 version rpy2

我尝试将rpy2与这样的python一起使用

import rpy2.robjects.lib.ggplot2 as ggplot2

并出现以下错误:

C:...\Anaconda3\lib\site-packages\rpy2\robjects\lib\ggplot2.py:67: UserWarning: This was designed againt ggplot2 version 2.2.1 but you have 3.2.0

如何安装旧版本的ggplot2?我已经在R中尝试过

require(devtools)
install_version("ggplot2", version = "2.2.1", repos = "http://cran.us.r-project.org")

我明白了:

Warning: cannot remove prior installation of package ‘digest’
ERROR: dependency 'digest' is not available for package 'ggplot2'
* removing 'C:/Users/.../R/win-library/3.5/ggplot2'
In R CMD INSTALL
Installation failed: Command failed (1)

0 个答案:

没有答案