unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: divoplade <d@divoplade.fr>,
	help-guix@gnu.org, Ricardo Wurmus <rekado@elephly.net>
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	[thread overview]
Message-ID: <867dnlb8v0.fsf@gmail.com> (raw)
In-Reply-To: <57572613456b4704f097480b687fef4e8944cf68.camel@divoplade.fr>

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


  reply	other threads:[~2021-02-06 13:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 16:14 Wrapping an R script: how do I compose the R_LIBS_SITE environment variable? divoplade
2021-02-06 13:53 ` zimoun [this message]
2021-02-06 15:28   ` Ricardo Wurmus
2021-02-07  0:24     ` divoplade
2021-02-07  7:11       ` Ricardo Wurmus
2021-02-07  9:30         ` divoplade
2021-02-07 15:03           ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=867dnlb8v0.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=d@divoplade.fr \
    --cc=help-guix@gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).