Hi Alex, Thanks for doing this. However, it seems your script does not correctly specify system dependencies, which IMO is the main benefit of using pacman instead of install.packages. For example, the sf package should depend on gdal, goes, and proj. Do you plan to fix all these dependencies? Best, Ista On Sat, May 26, 2018 at 12:04 PM, Alex Branham via aur-general <aur-general@archlinux.org> wrote:
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!
Thanks, Alex
Footnotes: [1] https://github.com/jabranham/r-cran-pkgbuilds/blob/master/gen-R-PKGBUILDS.R [2]
# Maintainer: Alex Branham <email-address-removed> _cranname=A3 _cranver=1.0.0 pkgname=r-cran-a3 pkgver=1.0.0 pkgrel=1 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." url="https://cran.r-project.org/web/packages/${_cranname}/index.html" arch=('x86_64') license=('GPL') depends=('r-cran-xtable' 'r-cran-pbapply')
optdepends=('r-cran-randomforest' 'r-cran-e1071')
source=("https://cran.r-project.org/src/contrib/${_cranname}_${_cranver}.tar.gz") md5sums=('027ebdd8affce8f0effaecfcd5f5ade2') package() { mkdir -p ${pkgdir}/usr/lib/R/library cd ${srcdir} R CMD INSTALL ${_cranname} -l ${pkgdir}/usr/lib/R/library }