Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rcpp package doesn't include Rcpp_precious_remove

Tags:

r

rcpp

I have been trying to create a database and installed the "DBI" package, but I am still facing this error. I reinstalled DBI and RSQLite package, but they don’t seem to work.

library("DBI")
con <- dbConnect
(RSQLite::SQLite(), dbname = ":memory:")
dbListTables(con)

Error:

Error in connection_connect(dbname, loadable.extensions, flags, vfs, extended_types) : function 'Rcpp_precious_remove' not provided by package 'Rcpp'

like image 530
Laxmi Agarwal Avatar asked Jul 17 '21 00:07

Laxmi Agarwal


People also ask

What is Rcpp_precious_remove?

One of these new functions is named Rcpp_precious_remove . RStudio Package Manager builds R packages against the latest version of Rcpp available in the current repository. This means that new package binaries -- even of old packages -- may be built against Rcpp 1.0.

What is package RCPP?

The 'Rcpp' package provides R functions as well as C++ classes which offer a seamless integration of R and C++. Many R data types and objects can be mapped back and forth to C++ equivalents which facilitates both writing of new code as well as easier integration of third-party libraries.

How to fix RCPP not working with another package?

I had the same problem with another package and the issue was that I was running a recent version of the package compiled against a previous version of Rcpp. As @user20650 points out in the comment, updating Rcpp to 1.0.7 should fix it. You can do it with install.packages ('Rcpp') or update.packages ()`.

How do I update RCPP?

As @user20650 points out in the comment, updating Rcpp to 1.0.7 should fix it. You can do it with install.packages ('Rcpp') or update.packages ()`. Using update.packages () you will be asked whether to update any other outdated package as well. On RStudio you can also use the packages panel to update the packages, as in the following image:

What is rcppclassic?

An earlier version of Rcpp, containing what we now call the 'classic Rcpp API' was written during 2005 and 2006 by Dominick Samperi. This code has been factored out of Rcpp into the package RcppClassic, and it is still available for code relying on the older interface. New development should always use this Rcpp package instead.

What is in the RCPP Gallery?

The Rcpp Gallery showcases over one hundred fully documented and working examples. The package RcppExamples contains a few basic examples covering the core data types. A number of examples are included, as are well over one thousand unit tests which provide additional usage examples.


2 Answers

I had the same problem with the packages: raster, tmap and sf. Reinstalling the package Rcpp solved the problem:

install.packages('Rcpp')
library(Rcpp)
like image 163
Daniela Avatar answered Oct 22 '22 14:10

Daniela


I had the same problem with another package and the issue was that I was running a recent version of the package compiled against a previous version of Rcpp. As user20650 points out in the comment, updating Rcpp to 1.0.7 should fix it:

install.packages('Rcpp') 

In RStudio you can also use the packages panel to update the packages, as in the following image:

Enter image description here

like image 45
Marcelo Avila Avatar answered Oct 22 '22 13:10

Marcelo Avila