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

Error installing R package Rmpfr - Error in rematchDefinition

我 运行 linux mint 上的 RStudio 1.1.419,并尝试安装 CRAN 包 Rmpfr 以支持任意精度数字。

根据我安装的其他问题:

sudo apt-get install libmpfr-dev

然后我重新启动了 RStudio,并再次尝试安装 Rmpfr 包。安装失败并出现以下错误,我在堆栈溢出或 google.

上看不到
** 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

太棒了。

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