taskReproducible paper template - Tasks: task #15772, R packages in Maneage

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #15772: R packages in Maneage

Submitted by:  Boud Roukema <boud>
Submitted on:  Fri 11 Sep 2020 12:56:07 AM UTC  
 
Should Start On:  Thu 10 Sep 2020 12:00:00 AM UTC Should be Finished on:  Thu 10 Sep 2020 12:00:00 AM UTC
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Percent Complete:  0% Assigned to:  None
Open/Closed:  Open Effort:  0.00

Fri 11 Sep 2020 06:30:15 PM UTC, comment #1: 

When you added the 'R CMD INSTALL ...' command, did it download all the dependencies as binary from the internet? The "make line" is a little ambiguous, did you add a full new Make rule (with a separate target for this package), or just added in the same rule that R is built.

I have never needed R, but I know a lot of people/projects use it. So have always been looking for someone who needs it (and is thus motivated!), to help in adding R packages in Maneage similar to Python. Many projects use R and if we have the infra-structure to add R packages easily (like in Python or X.org), it would be great.

Following the Python/X.org model, we can define a 'reproduce/software/make/r.mk' Makefile file which will be only in charge of building R and its packages. I also have a similar model in mind for TeXLive packages in the development branch (with a 'reproduce/software/make/tex.mk'). We can then "include" these language-specific packages into 'high-level.mk' the same way that we add Python and X.org's packages.

Having a look at the ggplot2 page you sent, it seems the dependencies are under the "Imports" title (in this case "digest, glue, grDevices, grid, gtable, isoband, MASS, mgcv, rlang, scales, stats, tibble, withr"). The page also has the link to the "package source" tarball. So effectively it has all the components we need!

If you can find the relevant command to disable internet connection when building from the tarball, here is an "easy" way to climb down the dependency tree! This is what we did in the first days of adding Python packages:

You simply add the rule to install your high-level package, 'ggplot2' in this case, but without any internet. Once it doesn't find its dependencies, it's build should fail, saying that you need to have XXXX (if it lists many depenendencies, just take the first one).

You then add another Make rule for XXXX, and set it as a prerequisite of 'ggplot2'. In the build of XXXX, it will probably complain about not having YYYY (as a dependency of XXXX), so you add a rule for YYYY and set it as a dependency for XXXX. You follow this loop until the first package (lowest-level package!) successfully builds!

Make will then automatically come up the dependency tree you have already setup, and will complain on the first package that needs another dependency (a different branch in the dependency tree!). So again you continue and soon you'll have all the low-level infrastructure built :-).

Like Python (and any high-level language), the core dependencies should be the same for most packages, so once we build them for one package, it is much more easier to do it for other packages.

Mohammad Akhlaghi <makhlaghi>
Project Administrator
Fri 11 Sep 2020 12:56:07 AM UTC, original submission:  

Does anyone currently have a maneage subsystem for installing R (R-project) extension packages?

Installing a "high" level extension package such as ggplot2

https://cran.r-project.org/web/packages/ggplot2/index.html

seems like it may need several dozen or who knows, maybe a hundred or so other R packages that it depends on.

The R install using the shell command line

R CMD INSTALL --library=$(ildir)/R/library $(word 1,$(filter $(tdir)/%,$^))

in a 'make' line in high-level.mk works fine for me for individual packages, but we really should have a system equivalent to that of the python system.

Boud Roukema <boud>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Posted a comment)
  • -email is unavailable- added by boud (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-09-11 makhlaghi SummaryR-project / R-base => R packages in Maneage

    Back to the top


    Powered by Savane 3.5