[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wrapping an R script: how do I compose the R_LIBS_SITE environment v
From: |
zimoun |
Subject: |
Re: Wrapping an R script: how do I compose the R_LIBS_SITE environment variable? |
Date: |
Sat, 06 Feb 2021 14:53:39 +0100 |
Hi,
On Fri, 05 Feb 2021 at 17:14, divoplade <d@divoplade.fr> wrote:
> I am using guix to write R packages. For convenience, I created a small
> R script that does the job.
Is “guix import cran” not enough? What is the source of these R packages?
Well, could you be more specific about “using guix to write R packages”?
> To make this script work as-is, I wrapped it using wrap-program. wrap-
> program creates a shell script that sets up environment variables and
> then call the real script, because R needs to be able to find all the
> packages and dependencies. More specifically, I need to extend the
> R_LIBS_SITE environment variable to point to all the R dependencies of
> my package, as well as their recursive dependencies.
This seems the job of Guix.
> How do I compute that? I only care about R dependencies, so using the
> whole recursive dependency tree of my package seems too much.
Ricardo wrote a R helper:
<https://elephly.net/paste/1612619217.R.html>
Basically, it does more or less what “guix install” does but directly in
the R repl. Maybe it is what you want.
Hope that helps,
simon