How to get RStudio to set R_ARCH correctly on Linux machines?

Hi all,

RStudio 2022.07 does not bother with R_ARCH on my linux machine, however, with RStudio 2012.12 and RStudio 2013.03 I encounter the problem that R_ARCH is set incorrectly, namely:

> Sys.getenv()
[...]
R_ARCH                     64
R_BROWSER                  /usr/bin/firefox
[...]

When I start R from the command line, the output is:

> Sys.getenv()
[...]
R_ARCH                     /64
R_BROWSER                  /usr/bin/firefox
[...]

Interestingly, on Windows machine the output is:

> Sys.getenv()
[...]
R_ARCH                     /x64
R_BROWSER                  /usr/bin/firefox
[...]

Why are the recent version of RStudio importing R_ARCH incorrectly from the environment that R generates on linux boxes, i.e. without the leading '/'? This makes it impossible to install any packages from source (which is pretty much the default on linux boxes).
I could not find a solution for this problem online. Does anybody now how to get RStudio to set/import R_ARCH correctly on linux machines?

Thanks in advance.
Cheers,
Berwin

G'day all,

mmh, I should have thought about this before. It turns out that I can always issue the command

> Sys.setenv(R_ARCH="/64")

to set R_ARCH to its correct value:

> Sys.getenv()
[...]
R_ARCH                            /64
R_BROWSER                         /usr/bin/firefox
[...]

It would be just nice if it was not necessary to do this manually each time.
Is there a way to incorporate this into the start up of RStudio? Or to get Posit to fix this feature of RStudio?

Cheers,
Berwin

If you have a bug report or feature request to make for RStudio, the best place for it would be the GitHub repository

Thank you, I will submit a bug-report.
Still trying to work out how the RStudio community works :slight_smile:
Cheers,
Berwin

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.