Skip to content

Add rtools and add registry for R #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Yunuuuu
Copy link

@Yunuuuu Yunuuuu commented Mar 10, 2025

Thanks for the scoop bucket repo.

This commit should resolve #30, Note that the same issue reported in Positron also exists in RStudio.

Additionally, this commit adds support for Rtools 40–44 for R versions > 4.0.0.

  • From R 4.2.0 onward, R inspects the environment variable RTOOLS42_HOME.
  • From R 4.3.0, it inspects RTOOLS43_HOME.
  • From R 4.4.0, it inspects RTOOLS44_HOME.

As a result, rtools42, rtools43, and rtools44 now set their respective environment variables.

For R versions ≥ 4.0.0 and < 4.2.0, r-release will create Renviron.site and add: PATH="${RTOOLS40_HOME-C:/rtools40}/usr/bin;${PATH}". This follows the same approach as R ≥ 4.2.0. So rtools40 also sets RTOOLS40_HOME.

My original R manifest was based on yours (should be R version 3.5), and I’ve maintained my own Scoop bucket repo at https://github.com/Yunuuuu/jade. I have used these configurations on multiple computers in my labs and for my senior and junior labmates (from R 3.5 to the latest version), and they have worked well.

I hope these improvements enhance the official R bucket repo!

@cderv
Copy link
Owner

cderv commented Jun 23, 2025

Sorry for the delay - I missed this PR when you opened it.

To be honest I know use rig to install and manage R, and no more scoop. So I scoop install rig and then use rig directly.

I know I added R to this repo, but I may have not pay attention that it was already in official bucket

rtools is in versions

❯ scoop search rtools
Results from local buckets...

Name         Version       Source   Binaries
----         -------       ------   --------
cdrtools     3.02a09       main
rtools       4.5.6608.6492 main
rtools35     3.5.0.4       versions
rtools40     4.0           versions
rtools42     4.2.5355.5357 versions
rtools43     4.3.5976.5975 versions
rtools44     4.4.6459.6401 versions
browsertools 3.95          nirsoft

and r is in main

❯ scoop info r

Name        : r
Description : A free software environment for statistical computing and graphics.
Version     : 4.5.1
Bucket      : main
Website     : https://www.r-project.org
License     : GPL-2.0-or-later
Updated at  : 13/06/2025 22:29:35
Updated by  : github-actions[bot]
Notes       : This version requires UCRT, which is part of Windows since Windows 10 and Windows Server 2016.

              For source packages installation, please install 'rtools'.
              For 32bit edition, please install 'versions/r41'.

              You'll need to type 'r.exe' to run R, because in Powershell 'r' runs the last command. Alternatively 'rterm'
              can be used to start the interactive R terminal session.

              You can remove Powershell's 'r' command with:
                  rm alias:\r

              ... but this only affects your current session: if you'd like to remove it for all future sessions you need
              to add the command above to your Powershell profile.

              Annoying, right?! You might want to check out Pshazz (scoop install pshazz)--this has a plugin to remove
              some crazy aliases from Powershell, as well as many other improvements.

Is your solution different than the one provided in the default buckets?

I was thinking of retiring the r one in here toward using the main bucket one.

So I am hesitant to add more to maintain. But I trust this works, I just don't use it directly anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Positron doesn't automatically pick up a scoop-installed R
2 participants