unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* R packages are not recognized.
@ 2024-09-16 14:02 Divya
  2024-09-16 17:15 ` Efraim Flashner
  2024-09-16 17:42 ` Ricardo Wurmus
  0 siblings, 2 replies; 3+ messages in thread
From: Divya @ 2024-09-16 14:02 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 269 bytes --]

I installed R packages using `guix install`, `guix shell` or by adding them to my home configuration, but in none of those ways can I get my R system (which is also installed through guix using system configuration) can recognize those packages.

What is going wrong?

[-- Attachment #2: Type: text/html, Size: 336 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: R packages are not recognized.
  2024-09-16 14:02 R packages are not recognized Divya
@ 2024-09-16 17:15 ` Efraim Flashner
  2024-09-16 17:42 ` Ricardo Wurmus
  1 sibling, 0 replies; 3+ messages in thread
From: Efraim Flashner @ 2024-09-16 17:15 UTC (permalink / raw)
  To: Divya; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 688 bytes --]

On Mon, Sep 16, 2024 at 02:02:30PM +0000, Divya wrote:
> I installed R packages using `guix install`, `guix shell` or by adding them to my home configuration, but in none of those ways can I get my R system (which is also installed through guix using system configuration) can recognize those packages.
> 
> What is going wrong?

Try installing R and the R packages in the same profile. I'd suggest
installing R as a user instead of system-wide, but that's up to you.

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: R packages are not recognized.
  2024-09-16 14:02 R packages are not recognized Divya
  2024-09-16 17:15 ` Efraim Flashner
@ 2024-09-16 17:42 ` Ricardo Wurmus
  1 sibling, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2024-09-16 17:42 UTC (permalink / raw)
  To: Divya; +Cc: guix-devel

Divya <divya@subvertising.org> writes:

> I installed R packages using `guix install`, `guix shell` or by adding them to my home configuration, but in none of those ways can I get
> my R system (which is also installed through guix using system configuration) can recognize those packages.
>
> What is going wrong?

R consults the value of the environment variable R_LIBS_SITE to
determine the list of directories to search for packages.  When R is
installed with Guix into a profile, Guix generates an entry in
$GUIX_PROFILE/etc/profile that points R to the sub-directory of this
profile containing R packages.

When you install R packages into a separate profile (and without
"r-minimal" or "r") then the generated etc/profile file will not have an
entry for R_LIBS_SITE.

You can either set this value manually before launching R, use
`.libPath` inside an R session to augment the search path, or install R
(i.e. "r-minimal" or "r") alongside the packages you intend to use.  You
can also use "guix shell" with a manifest containing both R and the
packages you need; Guix will set R_LIBS_SITE automatically in this case,
so that R inside of the Guix environment has access to all requested R
packages.

-- 
Ricardo


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-16 17:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-16 14:02 R packages are not recognized Divya
2024-09-16 17:15 ` Efraim Flashner
2024-09-16 17:42 ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).