安装R软件包Rmpfr时出错 - rematchDefinition

时间:2018-02-11 19:24:45

标签: r cran

我在linux mint上运行RStudio 1.1.419,并尝试安装CRAN软件包Rmpfr以获得任意精确数字支持。

根据我已安装的其他问题:

sudo apt-get install libmpfr-dev

然后我重新启动了RStudio,并尝试再次安装Rmpfr软件包。安装失败,出现以下错误,我在堆栈溢出或谷歌上没有看到。

** preparing package for lazy loading
Creating a generic function for ‘factorial’ from package ‘base’ in package ‘Rmpfr’
Creating a generic function for ‘quantile’ from package ‘stats’ in package ‘Rmpfr’
Creating a generic function for ‘mean’ from package ‘base’ in package ‘Rmpfr’
Creating a generic function for ‘median’ from package ‘stats’ in package ‘Rmpfr’
Error in rematchDefinition(definition, fdef, mnames, fnames, signature) : 
  methods can add arguments to the generic ‘median’ only if '...' is an argument to the generic
Error : unable to load R code in package ‘Rmpfr’
ERROR: lazy loading failed for package ‘Rmpfr’
* removing ‘/home/davidparks21/R/x86_64-pc-linux-gnu-library/3.2/Rmpfr’
Warning in install.packages :
  installation of package ‘Rmpfr’ had non-zero exit status

1 个答案:

答案 0 :(得分:3)

这是一个漂亮的。

stats::median已更改 - 您仍在使用R 3.2,在这种情况下:

> stats::median
function (x, na.rm = FALSE) 
UseMethod("median")
<bytecode: 0x0000000008473270>
<environment: namespace:stats>

现在,我们有:

> stats::median
function (x, na.rm = FALSE, ...) 
UseMethod("median")
<bytecode: 0x000000001071c050>
<environment: namespace:stats>

Rmpfr最近已更新,请参阅此处以供参考:
https://r-forge.r-project.org/scm/viewvc.php/pkg/R/Summary.R?view=markup&revision=272&root=rmpfr

如果您想使用最新版本的Rmpfr,则升级R