Reputation: 32081
I'm running RStudio 1.1.419 on linux mint, and trying to install the CRAN package Rmpfr for arbitrary precision number support.
As per other questions I've installed:
sudo apt-get install libmpfr-dev
Then I've restarted RStudio, and tried installing the Rmpfr package again. The installation fails with the following error which I don't see on stack overflow or 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
Upvotes: 1
Views: 1142
Reputation: 3923
That's a nifty one.
stats::median
has changed - you are still using R 3.2, in which case:
> stats::median
function (x, na.rm = FALSE)
UseMethod("median")
<bytecode: 0x0000000008473270>
<environment: namespace:stats>
Whereas now, we have:
> stats::median
function (x, na.rm = FALSE, ...)
UseMethod("median")
<bytecode: 0x000000001071c050>
<environment: namespace:stats>
Rmpfr has been updated recently, see here for reference:
https://r-forge.r-project.org/scm/viewvc.php/pkg/R/Summary.R?view=markup&revision=272&root=rmpfr
You should upgrade R if you want to use the latest version of Rmpfr.
Upvotes: 3