How To Install R-Rcpp on CentOS 8

R-Rcpp is Seamless R and C++ Integration

Introduction

In this tutorial we learn how to install R-Rcpp on CentOS 8.

What is R-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. Documentation about Rcpp is provided by several vignettes included in this package, via the Rcpp Gallery site at http the paper by Eddelbuettel and Francois (2011, JSS), and the book by Eddelbuettel (2013, Springer). See citation(“Rcpp”) for details on the last two.

We can use yum or dnf to install R-Rcpp on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install R-Rcpp.

Install R-Rcpp on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install R-Rcpp using dnf by running the following command:

sudo dnf -y install R-Rcpp

Install R-Rcpp on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install R-Rcpp using yum by running the following command:

sudo yum -y install R-Rcpp

How To Uninstall R-Rcpp on CentOS 8

To uninstall only the R-Rcpp package we can use the following command:

sudo dnf remove R-Rcpp

R-Rcpp Package Contents on CentOS 8

/usr/lib/.build-id
/usr/lib/.build-id/50
/usr/lib/.build-id/50/600d4106a8cbf8523111df33d9e4077bae42d3
/usr/lib64/R/library/Rcpp
/usr/lib64/R/library/Rcpp/CITATION
/usr/lib64/R/library/Rcpp/DESCRIPTION
/usr/lib64/R/library/Rcpp/INDEX
/usr/lib64/R/library/Rcpp/Meta
/usr/lib64/R/library/Rcpp/Meta/Rd.rds
/usr/lib64/R/library/Rcpp/Meta/features.rds
/usr/lib64/R/library/Rcpp/Meta/hsearch.rds
/usr/lib64/R/library/Rcpp/Meta/links.rds
/usr/lib64/R/library/Rcpp/Meta/nsInfo.rds
/usr/lib64/R/library/Rcpp/Meta/package.rds
/usr/lib64/R/library/Rcpp/Meta/vignette.rds
/usr/lib64/R/library/Rcpp/NAMESPACE
/usr/lib64/R/library/Rcpp/NEWS.Rd
/usr/lib64/R/library/Rcpp/R
/usr/lib64/R/library/Rcpp/R/Rcpp
/usr/lib64/R/library/Rcpp/R/Rcpp.rdb
/usr/lib64/R/library/Rcpp/R/Rcpp.rdx
/usr/lib64/R/library/Rcpp/announce
/usr/lib64/R/library/Rcpp/announce/ANNOUNCE-0.10.0.txt
/usr/lib64/R/library/Rcpp/announce/ANNOUNCE-0.11.0.txt
/usr/lib64/R/library/Rcpp/announce/ANNOUNCE-0.6.0.txt
/usr/lib64/R/library/Rcpp/announce/ANNOUNCE-0.7.0.txt
/usr/lib64/R/library/Rcpp/announce/ANNOUNCE-0.8.0.txt
/usr/lib64/R/library/Rcpp/announce/ANNOUNCE-0.9.0.txt
/usr/lib64/R/library/Rcpp/bib
/usr/lib64/R/library/Rcpp/bib/Rcpp.bib
/usr/lib64/R/library/Rcpp/discovery
/usr/lib64/R/library/Rcpp/discovery/cxx0x.R
/usr/lib64/R/library/Rcpp/doc
/usr/lib64/R/library/Rcpp/doc/Rcpp-FAQ.Rnw
/usr/lib64/R/library/Rcpp/doc/Rcpp-FAQ.pdf
/usr/lib64/R/library/Rcpp/doc/Rcpp-attributes.Rnw
/usr/lib64/R/library/Rcpp/doc/Rcpp-attributes.pdf
/usr/lib64/R/library/Rcpp/doc/Rcpp-extending.Rnw
/usr/lib64/R/library/Rcpp/doc/Rcpp-extending.pdf
/usr/lib64/R/library/Rcpp/doc/Rcpp-introduction.Rnw
/usr/lib64/R/library/Rcpp/doc/Rcpp-introduction.pdf
/usr/lib64/R/library/Rcpp/doc/Rcpp-jss-2011.Rnw
/usr/lib64/R/library/Rcpp/doc/Rcpp-jss-2011.pdf
/usr/lib64/R/library/Rcpp/doc/Rcpp-libraries.Rnw
/usr/lib64/R/library/Rcpp/doc/Rcpp-libraries.pdf
/usr/lib64/R/library/Rcpp/doc/Rcpp-modules.Rnw
/usr/lib64/R/library/Rcpp/doc/Rcpp-modules.pdf
/usr/lib64/R/library/Rcpp/doc/Rcpp-package.Rnw
/usr/lib64/R/library/Rcpp/doc/Rcpp-package.pdf
/usr/lib64/R/library/Rcpp/doc/Rcpp-quickref.Rnw
/usr/lib64/R/library/Rcpp/doc/Rcpp-quickref.pdf
/usr/lib64/R/library/Rcpp/doc/Rcpp-sugar.Rnw
/usr/lib64/R/library/Rcpp/doc/Rcpp-sugar.pdf
/usr/lib64/R/library/Rcpp/doc/index.html
/usr/lib64/R/library/Rcpp/help
/usr/lib64/R/library/Rcpp/help/AnIndex
/usr/lib64/R/library/Rcpp/help/Rcpp.rdb
/usr/lib64/R/library/Rcpp/help/Rcpp.rdx
/usr/lib64/R/library/Rcpp/help/aliases.rds
/usr/lib64/R/library/Rcpp/help/paths.rds
/usr/lib64/R/library/Rcpp/html
/usr/lib64/R/library/Rcpp/html/00Index.html
/usr/lib64/R/library/Rcpp/html/CppClass-class.html
/usr/lib64/R/library/Rcpp/html/CppConstructor-class.html
/usr/lib64/R/library/Rcpp/html/CppField-class.html
/usr/lib64/R/library/Rcpp/html/CppFunction-class.html
/usr/lib64/R/library/Rcpp/html/CppObject-class.html
/usr/lib64/R/library/Rcpp/html/CppOverloadedMethods-class.html
/usr/lib64/R/library/Rcpp/html/DollarNames-methods.html
/usr/lib64/R/library/Rcpp/html/Module-class.html
/usr/lib64/R/library/Rcpp/html/Module.html
/usr/lib64/R/library/Rcpp/html/R.css
/usr/lib64/R/library/Rcpp/html/Rcpp-deprecated.html
/usr/lib64/R/library/Rcpp/html/Rcpp-internal.html
/usr/lib64/R/library/Rcpp/html/Rcpp-package.html
/usr/lib64/R/library/Rcpp/html/Rcpp.package.skeleton.html
/usr/lib64/R/library/Rcpp/html/Rcpp.plugin.maker.html
/usr/lib64/R/library/Rcpp/html/RcppLdFlags.html
/usr/lib64/R/library/Rcpp/html/RcppUnitTests.html
/usr/lib64/R/library/Rcpp/html/compileAttributes.html
/usr/lib64/R/library/Rcpp/html/compilerCheck.html
/usr/lib64/R/library/Rcpp/html/cppFunction.html
/usr/lib64/R/library/Rcpp/html/demangle.html
/usr/lib64/R/library/Rcpp/html/dependsAttribute.html
/usr/lib64/R/library/Rcpp/html/evalCpp.html
/usr/lib64/R/library/Rcpp/html/exportAttribute.html
/usr/lib64/R/library/Rcpp/html/exposeClass.html
/usr/lib64/R/library/Rcpp/html/formals.html
/usr/lib64/R/library/Rcpp/html/getRcppVersion.html
/usr/lib64/R/library/Rcpp/html/interfacesAttribute.html
/usr/lib64/R/library/Rcpp/html/loadModule.html
/usr/lib64/R/library/Rcpp/html/loadRcppModules-deprecated.html
/usr/lib64/R/library/Rcpp/html/pluginsAttribute.html
/usr/lib64/R/library/Rcpp/html/populate.html
/usr/lib64/R/library/Rcpp/html/registerPlugin.html
/usr/lib64/R/library/Rcpp/html/setRcppClass.html
/usr/lib64/R/library/Rcpp/html/sourceCpp.html
/usr/lib64/R/library/Rcpp/libs
/usr/lib64/R/library/Rcpp/libs/Rcpp.so
/usr/lib64/R/library/Rcpp/prompt
/usr/lib64/R/library/Rcpp/prompt/module.Rd
/usr/lib64/R/library/Rcpp/skeleton
/usr/lib64/R/library/Rcpp/skeleton/Num.cpp
/usr/lib64/R/library/Rcpp/skeleton/Rcpp_modules_examples.Rd
/usr/lib64/R/library/Rcpp/skeleton/manual-page-stub.Rd
/usr/lib64/R/library/Rcpp/skeleton/rcpp_hello_world.R
/usr/lib64/R/library/Rcpp/skeleton/rcpp_hello_world.Rd
/usr/lib64/R/library/Rcpp/skeleton/rcpp_hello_world.cpp
/usr/lib64/R/library/Rcpp/skeleton/rcpp_hello_world.h
/usr/lib64/R/library/Rcpp/skeleton/rcpp_hello_world_attributes.cpp
/usr/lib64/R/library/Rcpp/skeleton/rcpp_module.cpp
/usr/lib64/R/library/Rcpp/skeleton/stdVector.cpp
/usr/lib64/R/library/Rcpp/skeleton/zzz.R

References

Summary

In this tutorial we learn how to install R-Rcpp on CentOS 8 using yum and dnf.