[aur-general] Packaging all CRAN packages for R

Alex Branham alex.branham at gmail.com
Sat May 26 16:04:48 UTC 2018

Hi all -

I'd like to use pacman to manage R packages, similar to how you can for
other languages (e.g. the python packages are all named python-*). There
are some packages available already, but not many (I count about 130
currently). I wrote a script[1] that generates PKGBUILDS for all the
packages on the Comprehensive R Archive Network (CRAN). There's 12,593
packages on CRAN as of today.

If you evaluate the script, then call write_all_pkgbuilds(), R will put
each PKGBUILD into PKGBUILDS/r-cran-<pkgname>/PKGBUILD. Here's an
example of the output.[2] It doesn't generate .SRCINFO or setup a git
repo (yet). It also doesn't take into account (yet) that there are
already 130ish R packages on the AUR. I named them r-cran-* rather than
r-* because 1) it's clearer where the packages are coming from and 2)
it's a pain to search for r-*

Is this something people would like to have in the AUR? I figured I
should ask before adding ~12.5k packages.

Any and all comments/feedback appreciated!


[1]  https://github.com/jabranham/r-cran-pkgbuilds/blob/master/gen-R-PKGBUILDS.R

# Maintainer: Alex Branham <email-address-removed>
pkgdesc="Supplies tools for tabulating and analyzing the results of predictive models. The methods employed are applicable to virtually any predictive model and make comparisons between different methodologies straightforward."
depends=('r-cran-xtable' 'r-cran-pbapply')

optdepends=('r-cran-randomforest' 'r-cran-e1071')

package() {
  mkdir -p ${pkgdir}/usr/lib/R/library
  cd ${srcdir}
  R CMD INSTALL ${_cranname} -l ${pkgdir}/usr/lib/R/library

More information about the aur-general mailing list