The newest R release (including recommended packages as well as development headers and tools) can be installed by running
sudo dnf install R
or yum
instead of dnf
for older EPEL versions. This ‘R’ RPM is a meta-package. It has no content but ensures that the following components are installed
Component | Description |
---|---|
R-core | The minimal R components necessary for a functional runtime |
R-core-devel | Core files for development of R packages (no Java) |
R-java | R with Fedora-provided Java Runtime Environment |
R-java-devel | Development package for use with Java enabled R components |
libRmath | Standalone math library from the R project |
libRmath-devel | Headers from the R standalone math library |
This division enables minimal installations (e.g., with no Java, with no development tools…), but generally R users will need all the components to be able to install any package from source. Therefore, it is recommended to install the ‘R’ meta-package.
The Fedora RPMs for R have been ported to CentOS/RHEL by the project Extra Packages for Enterprise Linux (EPEL). These RPMs are also compatible with distributions derived from CentOS/RHEL.
To use the EPEL repository, it is sufficient to download and install the appropriate “epel-release” RPM, as described in the EPEL FAQ. Then R can be installed as described above.
The R installation is divided in two directories:
/usr/lib/R
(/usr/lib64/R
in 64-bit architectures) contains R binaries and libraries./usr/share/R
contains documentation, licenses and other non-binary files.In the same way,
/usr/lib/R/library
(/usr/lib64/R/library
in 64-bit architectures) contains system-provided packages with binary code./usr/share/R/library
contains system-provided packages without binary code.Additionally, the R installation adds the following paths:
/usr/local/lib/R/library
(the same for 64-bit architectures), which is not used by any package in the official repositories./home/<user>/R/<architecture>-redhat-linux-gnu-library/<version>
, which is the destination for any package installed from the R console using install.packages
.For example, these are the library paths for a x86_64 machine with R 4.0 installed:
> .libPaths()
[1] "/home/<user>/R/x86_64-redhat-linux-gnu-library/4.0"
[2] "/usr/local/lib/R/library"
[3] "/usr/lib64/R/library"
[4] "/usr/share/R/library"
Recommended R packages are included as part of the R-core component. A number of add-on packages from CRAN, Bioconductor and other sources are readily available via the official repositories. Hence, running
dnf repoquery --repo=fedora-source R-*
provides a comprehensive list.
The listing below shows all RPMs available for R packages on Fedora 32 (Thirty Two), classified by the R repository that would normally be used to install the package from within R (see the help page ?chooseRepositories
).
## $CRAN
## [1] "abind" "acepack" "ape"
## [4] "argon2" "askpass" "assertthat"
## [7] "AUC" "backports" "base64enc"
## [10] "Bessel" "biglm" "bindr"
## [13] "bindrcpp" "bit" "bit64"
## [16] "bitops" "blob" "brew"
## [19] "broom" "Cairo" "callr"
## [22] "car" "caTools" "cellranger"
## [25] "chron" "cli" "cliapp"
## [28] "clipr" "clisymbols" "coda"
## [31] "colorspace" "combinat" "commonmark"
## [34] "corpus" "crayon" "curl"
## [37] "cyclocomp" "data.table" "date"
## [40] "DBI" "dbplyr" "debugme"
## [43] "deldir" "desc" "devtools"
## [46] "dichromat" "diffobj" "digest"
## [49] "disposables" "doParallel" "dplyr"
## [52] "dtplyr" "ellipsis" "errors"
## [55] "evaluate" "expm" "fansi"
## [58] "farver" "fastmap" "fastmatch"
## [61] "filehash" "FMStable" "foghorn"
## [64] "fontBitstreamVera" "fontLiberation" "forcats"
## [67] "foreach" "formatR" "fortunes"
## [70] "fs" "fts" "futile.logger"
## [73] "futile.options" "future" "gamlss.dist"
## [76] "gapminder" "gargle" "gdata"
## [79] "gdtools" "gee" "geepack"
## [82] "generics" "getPass" "ggplot2"
## [85] "ggplot2movies" "gh" "git2r"
## [88] "globals" "glue" "gmailr"
## [91] "gmp" "gplots" "gsl"
## [94] "gss" "gtable" "gtools"
## [97] "haven" "here" "hexbin"
## [100] "highlight" "highr" "hms"
## [103] "htmltools" "htmlwidgets" "httpuv"
## [106] "httr" "hunspell" "igraph"
## [109] "import" "ini" "inline"
## [112] "IRdisplay" "IRkernel" "iterators"
## [115] "itertools" "jose" "jpeg"
## [118] "jqr" "jsonlite" "knitr"
## [121] "labeling" "lambda.r" "later"
## [124] "lazyeval" "lifecycle" "lintr"
## [127] "listenv" "littler" "lmodel2"
## [130] "lmtest" "lokern" "lubridate"
## [133] "magrittr" "mapproj" "maps"
## [136] "mAr" "markdown" "matrixStats"
## [139] "measurements" "memoise" "microbenchmark"
## [142] "mime" "miniUI" "mlbench"
## [145] "mnormt" "mockery" "mockr"
## [148] "modelr" "msm" "multcomp"
## [151] "munsell" "mvtnorm" "nanotime"
## [154] "ncdf4" "NISTunits" "nws"
## [157] "nycflights13" "openssl" "orcutt"
## [160] "packrat" "parsedate" "pbdRPC"
## [163] "pbdZMQ" "pdftools" "pillar"
## [166] "pingr" "pkgbuild" "pkgconfig"
## [169] "pkgdown" "pkgload" "plogr"
## [172] "plyr" "png" "poLCA"
## [175] "polyclip" "polynom" "praise"
## [178] "prettycode" "prettydoc" "prettyunits"
## [181] "processx" "profvis" "progress"
## [184] "promises" "ps" "purrr"
## [187] "qcc" "qpdf" "qtl"
## [190] "quadprog" "quantities" "R.cache"
## [193] "R.devices" "R.methodsS3" "R.oo"
## [196] "R.rsp" "R.utils" "R6"
## [199] "rappdirs" "rcmdcheck" "RColorBrewer"
## [202] "Rcpp" "RcppCCTZ" "RCurl"
## [205] "readr" "readxl" "rematch"
## [208] "rematch2" "remotes" "repr"
## [211] "reprex" "repurrrsive" "reshape"
## [214] "reshape2" "reticulate" "rex"
## [217] "rgdal" "rgeos" "RhpcBLASctl"
## [220] "rhub" "RInside" "rlang"
## [223] "rlecuyer" "RM2" "rmarkdown"
## [226] "Rmpfr" "RODBC" "roxygen2"
## [229] "rprintf" "rprojroot" "rsconnect"
## [232] "RSQLite" "rstudioapi" "rsvg"
## [235] "RUnit" "rversions" "rvest"
## [238] "sandwich" "scales" "scatterplot3d"
## [241] "sciplot" "selectr" "sessioninfo"
## [244] "sfsmisc" "shiny" "showtext"
## [247] "showtextdb" "simmer" "snow"
## [250] "sodium" "sourcetools" "sp"
## [253] "spelling" "statnet.common" "stringdist"
## [256] "stringi" "stringr" "styler"
## [259] "svglite" "sys" "sysfonts"
## [262] "systemfit" "systemfonts" "testit"
## [265] "testthat" "TH.data" "tibble"
## [268] "tidyr" "tidyselect" "tikzDevice"
## [271] "timeDate" "timeSeries" "tinytest"
## [274] "tinytex" "tkrplot" "tufte"
## [277] "tweenr" "udunits2" "unitizer"
## [280] "units" "unix" "usethis"
## [283] "utf8" "uuid" "V8"
## [286] "vctrs" "viridisLite" "waveslim"
## [289] "wavethresh" "webp" "websocket"
## [292] "webutils" "wesanderson" "whisker"
## [295] "whoami" "withr" "xfun"
## [298] "XML" "xml2" "xmlparsedata"
## [301] "xopen" "xtable" "yaml"
## [304] "zeallot" "zoo"
##
## $`BioC software`
## [1] "affyio" "Biobase" "BiocGenerics"
## [4] "BiocParallel" "biomaRt" "Biostrings"
## [7] "BSgenome" "BufferedMatrix" "DelayedArray"
## [10] "DynDoc" "GenomeInfoDb" "GenomicAlignments"
## [13] "GenomicRanges" "IRanges" "preprocessCore"
## [16] "qvalue" "Rhtslib" "Rsamtools"
## [19] "rtracklayer" "S4Vectors" "SummarizedExperiment"
## [22] "tkWidgets" "widgetTools" "XVector"
##
## $`BioC annotation`
## [1] "GenomeInfoDbData"
##
## $Omegahat
## [1] "Rcompression" "RCurl" "XML"
##
## $`R-Forge`
## [1] "abind" "Bessel" "bit" "bit64"
## [5] "brew" "car" "colorspace" "data.table"
## [9] "date" "dichromat" "digest" "doParallel"
## [13] "expm" "foreach" "fortunes" "gamlss.dist"
## [17] "gdata" "gplots" "gtools" "highlight"
## [21] "htmltools" "iterators" "itertools" "labeling"
## [25] "lmodel2" "lokern" "matrixStats" "msm"
## [29] "multcomp" "mvtnorm" "NISTunits" "Rcpp"
## [33] "rgdal" "rgeos" "Rmpfr" "sandwich"
## [37] "scatterplot3d" "stringi" "systemfit" "TH.data"
## [41] "tikzDevice" "timeDate" "timeSeries" "waveslim"
## [45] "xtable" "zoo"
##
## $rforge.net
## [1] "Cairo" "base64enc" "brew" "evaluate" "fastmatch"
## [6] "formatR" "highr" "jpeg" "knitr" "markdown"
## [11] "mime" "png" "testit" "tikzDevice" "uuid"
##
## $Other
## [1] "Rsolid" "ascii"
Note that the classification is not mutually exclusive (e.g. R-RCurl appears several times) and that there are RPMs that are not available from any standard R repository. These are listed under “Other”.
The cran2copr project maintains binary RPM repositories for the current and previous stable Fedora version for most of CRAN (more than 15k packages as of Jul. 2020) in an automated way using Fedora Copr.
These repositories are automatically synchronized with CRAN every day at 00:00 UTC through a GitHub Action that removes archived packages and builds the most recent updates. To ensure compatibility with the official repositories, these set of packages are named “R-CRAN-pkgname” (instead of “R-pkgname”), and are installed into /usr/local/lib/R/library
.
To enable this Copr repository in your system:
sudo dnf install 'dnf-command(copr)'
sudo dnf copr enable iucar/cran
sudo dnf install R-CoprManager
The last command is optional, but recommended, because the CoprManager package integrates binary package installation into your R session. In this way, you can just run e.g.
> install.packages("car")
in the R console, and the package will be automatically installed from the Copr repository. If a package is not available, then it just falls back to normal installation from CRAN.
On the other hand, remove.packages
will still remove only packages installed in your user library. If you want to remove system packages, run:
> CoprManager::remove_copr("car")
If you want to disable the CoprManager, so that install.packages
only works with CRAN again, then run:
> CoprManager::disable()
> install.packages("car") # from CRAN to user lib
The following add-ons are available in the official repositories:
Component | Description |
---|---|
rstudio-desktop | Integrated development environment for the R language |
rstudio-server | Access RStudio via a web browser |
rkward | Graphical front-end for the R language |
emacs-ess | Emacs Speaks Statistics under GNU Emacs |
The best place to report problems with these packages or ask R questions specific to Fedora/EPEL is the R-SIG-Fedora mailing list. See https://stat.ethz.ch/mailman/listinfo/r-sig-fedora for more information.
Thanks to Martyn Plummer for maintaining a previous version of this page. The R stack for Fedora/EPEL is maintained by Tom “Spot” Callaway, Elliott Sales de Andrade, José Abílio Matos, Mattias Ellert… among others. Additional CRAN RPMs for Fedora (15k+) are maintained by Iñaki Ucar, built and distributed through Fedora Copr. The Copr Build System is maintained by Miroslav Suchý, Pavel Raiskup, Jakub Kadlcik… and many others.