Giter Club home page Giter Club logo

rig's Introduction

The R Installation Manager

Install, remove, configure R versions.

🚀  Features

  • Works on macOS, Windows and Linux.
  • Supports many Linux distributions, see list below.
  • Easy installation and update, no system requirements on any platform.
  • Install multiple R versions.
  • Select the default R version, for the terminal and RStudio.
  • Select R version to install using symbolic names: devel, next, release, oldrel, etc.
  • List R versions available to install.
  • Run multiple versions at the same time using quick links. E.g. R-4.1 or R-4.1.2 starts R 4.1.x. Quick links are automatically added to the user’s path.
  • On macOS it comes with a menu bar app that shows the default R version and lets to select it interactively. See below.
  • On arm64 macs select between x86_64 and arm64 versions or R, or install both.
  • Sets up the default CRAN mirror and PPM.
  • Installs pak and set up automatic system requirements installation.
  • Creates and configures user level package libraries.
  • Restricts permissions to the system library. (On macOS, not needed on Windows and Linux).
  • Includes auto-complete for zsh and bash, on macOS and Linux.
  • Updates R installations to allow debugging with lldb, and to allow core dumps, on macOS.
  • Installs the appropriate Rtools versions on Windows and sets them up.
  • Cleans up stale R-related entries from the Windows registry.
  • Switches to root/administrator user as needed.
  • Supports JSON output for scripting.

🐞  Known Issues

  • On macOS, R.app often does not work if you install multiple R versions.
  • On Windows, rig rstudio changes the R version in the registry temporarily before starting RStudio and then changes it back after a short wait. If RStudio starts up very slowly, then the wait might be too short, and it might start up with the wrong R version.
  • On Windows Rtools installation will fail if the same version of Rtools is already installed.

Found another issue? Please report it in our issue tracker.

⬇️  Installing rig

Installing rig on macOS

You can one of our installers or our Homebrew tap.

Installing rig on macOS (installer)

Download the latest release from https://github.com/r-lib/rig/releases and install it the usual way.

Installing rig on macOS (Homebrew)

If you use Homebrew (Intel or Arm version), you can install rig from our tap:

brew tap r-lib/rig
brew install --cask rig

You can use x86_64 rig on Arm macs, and it will be able to install Arm builds of R. But you cannot use Arm rig on Intel macs. If you use both brew versions, only install rig with one of them.

To update rig you can run

brew upgrade --cask rig

Installing rig on Windows

There are several possible ways to install rig on Windows: with our installer, winget, scoop or choco.

Installing rig on Windows (WinGet)

An easy way to install rig on Windows 10 and above is to use the built-in WinGet package manager. The name of the package is posit.rig.

winget install posit.rig

Installing rig on Windows (installer)

Download the latest release from https://github.com/r-lib/rig/releases and install it the usual way.

rig adds itself to the user’s path, but you might need to restart your terminal after the installation on Windows.

Installing rig on Windows (Scoop)

If you use Scoop, you can install rig from the scoop bucket at cderv/r-bucket:

scoop bucket add r-bucket https://github.com/cderv/r-bucket.git
scoop install rig

To update run

scoop update rig

Installing rig on Windows (Chocolatey)

If you use Chocolatey (e.g. on GitHub Actions) you can install rig with

choco install rig

and upgrade to the latest version with

choco upgrade rig

Installing rig on Linux

On Linux you can install rig from a DEB or RPM package, or from a tarball.

Supported Linux distributions

  • Debian 10, 11, 12,
  • Ubuntu 18.04, 20.04, 22.04,
  • Fedora Linux 37, 38, 39,
  • OpenSUSE 15.3, 15.4, 15.5,
  • SUSE Linux Enterprise 15 SP3, SP4, SP5,
  • CentOS 7,
  • Red Hat Enterprise Linux 7, 8, 9,
  • AlmaLinux 8, 9,
  • Rocky Linux 8, 9.

We use the R builds from the Posit R-builds project.

Installing rig on Ubuntu and Debian (DEB package)

On any Ubuntu or Debian distro, you can use our package repository to install rig. First you add our key to your config:

`which sudo` curl -L https://rig.r-pkg.org/deb/rig.gpg -o /etc/apt/trusted.gpg.d/rig.gpg

Then add the rig repository:

`which sudo` sh -c 'echo "deb http://rig.r-pkg.org/deb rig main" > /etc/apt/sources.list.d/rig.list'

If you already added both the key and the repository, then install the r-rig package (rig is a different package in Debian and Ubuntu):

`which sudo` apt update
`which sudo` apt install r-rig

Installing rig on RHEL, Fedora, CentOS, Rocky Linux, Almalinux, etc. (RPM package)

On most RPM based distros (except for OpenSUSE and SLES) you can install our RPM package directly:

`which sudo` yum install -y https://github.com/r-lib/rig/releases/download/latest/r-rig-latest-1.$(arch).rpm

Installing rig on OpenSUSE and SLES (RPM package)

On OpenSUSE and SLES use zypper instead of yum:

`which sudo` zypper install -y --allow-unsigned-rpm https://github.com/r-lib/rig/releases/download/latest/r-rig-latest-1.$(arch).rpm

Installing rig on any Linux distribution (tarball)

Download the latest releast from https://github.com/r-lib/rig/releases and uncompress it to /usr/local

curl -Ls https://github.com/r-lib/rig/releases/download/latest/rig-linux-$(arch)-latest.tar.gz |
  `which sudo` tar xz -C /usr/local

Installing auto-complete on macOS and Linux

The macOS and Linux installers also install completion files for zsh and bash.

zsh completions work out of the box.

For bash completions install the bash-completion package from Homebrew or your Linux distribution and make sure it is loaded from your .bashrc. (You don’t need to install bash from Homebrew, but you can if you like.)

⚙️  Usage

Use rig add to add a new R installation:

rig add release

Use rig list to list the currently installed R versions, and rig default to set the default one.

Run rig to see all commands and examples.

Run rig --help and rig <subcommand> --help to see the documentation.

Command list:

rig add        -- install a new R version [alias: install]
rig available  -- List R versions available to install.
rig default    -- print or set default R version [alias: switch]
rig library    -- manage package libraries [alias: lib] (experimental)
rig list       -- list installed R versions [alias: ls]
rig resolve    -- resolve a symbolic R version
rig rm         -- remove R versions [aliases: del, delete, remove]
rig rstudio    -- start RStudio with the specified R version
rig run        -- Run R, an R script or an R project
rig sysreqs    -- manage R-related system libraries and tools (experimental) (macOS)
rig system     -- manage current installations

Run rig <subcommand> --help for information about a subcommand.

macOS rig system subcommands

rig system add-pak                 -- install or update pak for an R version
rig system allow-debugger          -- allow debugging R with lldb and gdb
rig system allow-debugger-rstudio  -- allow debugging RStudio with lldb and gdb
rig system allow-core-dumps        -- allow creating core dumps when R crashes
rig system fix-permissions         -- restrict system library permissions to admin
rig system forget                  -- make system forget about R installations
rig system make-links              -- create R-* quick links
rig system make-orthogonal         -- make installed versions orthogonal
rig system no-openmp               -- remove OpenMP (-fopenmp) option for Apple compilers
rig system setup-user-lib          -- set up automatic user package libraries [alias: create-lib]

Windows rig system subcommands

rig system add-pak                 -- install or update pak for an R version
rig system clean-registry          -- clean stale R related entries in the registry
rig system make-links              -- create R-* quick links
rig system setup-user-lib          -- set up automatic user package libraries [alias: create-lib]
rig system update-rtools40         -- update Rtools40 MSYS2 packages

Linux rig system subcommands

rig system detect-platform         -- detect operating system version and distribution
rig system add-pak                 -- install or update pak for an R version
rig system make-links              -- create R-* quick links
rig system setup-user-lib          -- set up automatic user package libraries [alias: create-lib]

⛵  macOS menu bar app

View and select the default R version in the macOS menu bar. Start RStudio or a recent RStudio project with the selected R version. Select between your package libraries.

To start the menu bar app the first time, run the Rig app in “Applications” from Finder or Spotlight, or run

open -a Rig

from a Terminal. Then you can check the “Launch at login” box in “Preferences” to start it automatically in the future.

Note: if you have a lot of menu bar apps running on an M1/M2 mac, then the some of them might be under the camera area. There is no good solution for this currently, other than running less menu bar apps.

📦  Docker containers with rig (and multiple R versions)

Use the ghcr.io/r-lib/rig/r Docker container to easily run multiple R versions. It is currently based on Ubuntu 22.04 and contains rig and the six latest R versions, including R-next and R-devel. It is available for x86_64 and arm64 systems:

> docker run ghcr.io/r-lib/rig/r rig ls
* name   version    aliases
------------------------------------------
  3.6.3
  4.0.5
  4.1.3
  4.2.3             oldrel
* 4.3.1             release
  devel  (R 4.4.0)
  next   (R 4.3.1)

See this image on GitHub.

All containers

We also have other containers with rig and either R-devel and R-release preinstalled, on various Linux distros. Here is a table of all containers:

Name OS R version Tags
ghcr.io/r-lib/rig/ubuntu-22.04-multi Ubuntu 22.04 last 6 (daily) r, rig, multi, ubuntu-multi
ghcr.io/r-lib/rig/ubuntu-22.04-release Ubuntu 22.04 release release, ubuntu, ubuntu-release, ubuntu-latest, ubuntu-latest-release, ubuntu-22.04
ghcr.io/r-lib/rig/ubuntu-22.04-devel Ubuntu 22.04 devel (daily) devel, ubuntu-devel, ubuntu-latest-devel
ghcr.io/r-lib/rig/ubuntu-20.04-release Ubuntu 20.04 release ubuntu-20.04
ghcr.io/r-lib/rig/ubuntu-20.04-devel Ubuntu 20.04 devel (daily)
ghcr.io/r-lib/rig/debian-12-release Debian 12 release debian, debian-release, debian-latest, debian-latest-release, debian-12
ghcr.io/r-lib/rig/debian-12-devel Debian 12 devel (daily) debian-devel, debian-latest-devel
ghcr.io/r-lib/rig/debian-11-release Debian 11 release debian-11
ghcr.io/r-lib/rig/debian-11-devel Debian 11 devel (daily)
ghcr.io/r-lib/rig/debian-10-release Debian 10 release debian-10
ghcr.io/r-lib/rig/debian-10-devel Debian 10 devel (daily)
ghcr.io/r-lib/rig/fedora-39-release Fedora 39 release fedora, fedora-release, fedora-latest, fedora-latest-release, fedora-39
ghcr.io/r-lib/rig/fedora-39-devel Fedora 39 devel fedora-devel, fedora-latest-devel
ghcr.io/r-lib/rig/fedora-38-release Fedora 38 release fedora-38
ghcr.io/r-lib/rig/fedora-38-devel Fedora 38 devel
ghcr.io/r-lib/rig/opensuse-15.5-release OpenSUSE Leap 15.5 release opensuse, opensuse-release, opensuse-latest, opensuse-latest-release, opensuse-15.5
ghcr.io/r-lib/rig/opensuse-15.5-devel OpenSUSE Leap 15.5 devel (daily) opensuse-devel, opensuse-latest-devel
ghcr.io/r-lib/rig/opensuse-15.4-release OpenSUSE Leap 15.4 release opensuse-15.4
ghcr.io/r-lib/rig/opensuse-15.4-devel OpenSUSE Leap 15.4 devel (daily)

For convenience, we also create these tags:

Tag Image Description
ghcr.io/r-lib/rig/r ubuntu-22.04-multi Last 6 R versions on latest Ubuntu.
ghcr.io/r-lib/rig/rig
ghcr.io/r-lib/rig/multi
ghcr.io/r-lib/rig/ubuntu-multi
ghcr.io/r-lib/rig/release ubuntu-22.04-release Latest R release.
ghcr.io/r-lib/rig/ubuntu ubuntu-22.04-release Latest R release on latest Ubuntu.
ghcr.io/r-lib/rig/ubuntu-22.04 ubuntu-22.04-release Latest R release on Ubuntu 22.04.
ghcr.io/r-lib/rig/devel ubuntu-22.04-devel R devel.
ghcr.io/r-lib/rig/ubuntu-devel ubuntu-22.04-devel R devel on latest Ubuntu.
ghcr.io/r-lib/rig/ubuntu-20.04 ubuntu-20.04-release Latest R release on Ubuntu 20.04.
ghcr.io/r-lib/rig/debian debian-12-release Latest R release on latest Debian.
ghcr.io/r-lib/rig/debian-12 debian-12-release Latest R release on Debian 12.
ghcr.io/r-lib/rig/debian-devel debian-12-devel R devel on latest Debian.
ghcr.io/r-lib/rig/debian-11 debian-11-release Latest R release on Debian 11.
ghcr.io/r-lib/rig/debian-10 debian-10-release Latest R release on Debian 10.
ghcr.io/r-lib/rig/fedora fedora-39-release Latest R release on latest Fedora.
ghcr.io/r-lib/rig/fedora-39 fedora-39-release Latest R release on Fedora 39.
ghcr.io/r-lib/rig/fedora-devel fedora-39-devel R devel on latest Fedora.
ghcr.io/r-lib/rig/fedora-38 fedora-38-release Latest R release on Fedora 38.
ghcr.io/r-lib/rig/opensuse opensuse-15.5-release Latest R release on latest OpenSUSE.
ghcr.io/r-lib/rig/opensuse-15.5 opensuse-15.5-release Latest R release on OpenSUSE 15.5.
ghcr.io/r-lib/rig/opensuse-devel opensuse-15.5-devel R devel on latest OpenSUSE.
ghcr.io/r-lib/rig/opensuse-15.4 opensuse-15.4-release Latest R release on OpenSUSE 15.4.

See all container images on GitHub.

Docker container features:

For all containers:

  • rig is pre-installed, so you can easily add or remove R versions.
  • https://github.com/r-lib/pak is installed for all R versions.
  • Automatic system dependency installation via pak.
  • Linux binary packages are automatically installed from the Posit Public Package Manager in x86_64 containers, on Ubuntu, Debian and OpenSUSE.
  • Available on x86_64 and aarch64.

🤝  Feedback

Please open an issue in our issue tracker at https://github.com/r-lib/rig/issues

❓  FAQ

Why does rig create a user package library?

Installing non-base packages into a user package library has several benefits:

  • The system library is not writeable for regular users on some systems (Windows and Linux, typically), so we might as well create a properly versioned user library at the default place.
  • Some tools need a clean R environment, with base packages only, and do not work well if user packages are installed into the system library. E.g. R CMD check is such a tool, and https://github.com/r-lib/revdepcheck is another.
  • You can delete an R installation (e.g. with rig rm) and then and then install it again, without losing your R packages.
Why does rig install pak?

To be able to install R packages efficiently, from CRAN, Bioconductor or GitHub, right from the start. pak also supports installing system libraries automatically on some Linux systems.

If you don’t want rig add to install pak, use the --without-pak option.

Why does rig change the permissions of the system library (on macOS)?

To make sure that you don’t install packages accidentally into the system library. See “Why does rig create a user package library?” above.

Why does rig set the default CRAN mirror?

To avoid the extra work the users need to spend on this.

The https://cloud.r-project.org mirror is usually better than the other, in that it is a CDN that is close to most users, and that it is updated more often.

If you want to use a different mirror, you can set the repos option in your .Rprofile, so the rig repo settings will be ignored.

You can also use the --without-cran-mirror option of rig add.

Why does rig set up P3M?

P3M (Posit Public Package Manager) is generally superior to a regular CRAN mirror on Windows and many Linux systems.

On Linux it includes binary packages for many popular distributions.

On Windows, it includes up to date binary packages for older R versions as well.

To avoid P3M use the --without-p3m option (or the legacy --without-rspm) option of rig add.

Can rig install R without admin permissions

No, currently it cannot.

How is rig different from RSwitch?

While there is a small overlap in functionality, rig and RSwitch are very different. I suggest you look over the features of both to decide which one suits your needs better.

If you like rig and also like the extra features of RSwitch, then you can use them together just fine: changing the default R version in RSwitch also changes it in rig and vice versa. You can use the rig cli and the RSwitch app together, or you can also use both menu bar apps at the same time.

📘   License

MIT 2021-2024 © Posit Software, PBC.

rig's People

Contributors

achubaty avatar aspeddro avatar cderv avatar davisvaughan avatar eitsupi avatar emilhvitfeldt avatar gaborcsardi avatar gvelasq avatar jennybc avatar krlmlr avatar tymekdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rig's Issues

rim update

To download and install the latest rim version.

Multiple installations of the same R version

Hi

Thanks for the great tool, I think this will make lots of people's lives easier 🎉 ! I have been playing around with getting two installations of the same R version to work. Probably a fairly niche thing so not suggesting you add it as a feature (unless there is demand) but thought I would post my solution in case it was helpful to anyone (and in case there are issues I haven't come across yet). My use case is to have two versions of R 4.2 installed, one with Bioconductor release (for analysis) and one with Bioconductor devel (for development) and to be able to switch between the two as needed.

These are the steps that worked for me on MacOS:

  1. Install the desired R version.
rim install release
  1. Rename the installed directory
mv /Library/Frameworks/R.framework/Versions/4.2 /Library/Frameworks/R.framework/Versions/4.2-bioc
  1. Modify the main R script so that all paths point to the new location
vim /Library/Frameworks/R.framework/Versions/4.2-bioc/Resources/bin/R

Search for all occurrences of the installed R version and modify them to match the new path (eg. change all 4.2 to 4.2-bioc)

  1. Modify the base Renviron file to set the default user library path
vim /Library/Frameworks/R.framework/Versions/4.2-bioc/Resources/etc/Renviron

Find where R_LIBS_USER is set and modify it to point to the new installation directory.

R_LIBS_USER=${R_LIBS_USER:-'/Users/user/Library/R/x86_64/4.2-bioc/library'}

(I feel like there should be a way to do this without hard coding a path but haven't really looked into it)

  1. Re-install the desired R version.
rim install release

After this I am able to switch between 4.2 and 4.2-bioc with both installations having .libPaths() correctly set to different directories. You probably lose the ability to make updates for new R versions but worth it for me to be able to easily switch between these two environments.

library management

Something like

rig library list --version <rversion>
rig library default --version <rversion>
rig library default <new-default> --version <rversion>
rig library add --version <rversion>
rig library del --version <rversion>

--version defaults to the current default R version.

Later we'll also have --system and --user for rig library default, to allow setting the default at the user and the system level.

Pinning packages

rig pin add <package> <package-ref> --version <rversion> --library <library>
rig pin del <package> --version <rversion> --library <library>
rig pin list --version <rversion> --library <library>

--version defaults to the current R version and --library defaults to the current library.

Run subprocess with a different R version

via new rim run command?

$ R --version
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.

$ rim run 3.5 R --version
R version 3.5.3 (2019-03-11) -- "Great Truth"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.

Add example with `-a arm64` to `rig add` docs?

The downside of doing this is that it's platform (macOS) specific. However, given the default architecture will be x86_64 even on arm64 Macs (which makes sense, given it's in line with R distributions), it'd be nice to have the -a/--arch option be more visible in the docs/help examples.

I'd been doing, e.g. rig add 4.2-arm64, not realizing you could use devel and release with -a arm64 until I saw you do so in your demo. Basically: I think it's worth highlighting because it's handy!

Don't print .DS_Store in list

Hey,

Thanks a lot for rim! That was much needed, awesome.

On mac, I think rim list shouldn't print .DS_Store?

colin$ rim list
.DS_Store
3.4
3.6
4.1
4.2

[feature request] rim start

It would be nice to be able to start specific versions of R, instead of switching from one to the other with default.

For example, instead of

rim default 4.2.0
R
# [... try the new version...]
q()
rim default 4.1.2
R
# [... get back to where I was at...]

It would be cool to be able to do:

rim start 4.1.2
# [... try the new version...]
q()
# [... still have the default version...]

Feature parity with r-lib/actions

For setup-r:

  • Linux support (#7)
  • Remove -fopenmp flag on macOS (#13)
  • Set up RSPM (#15)
  • Add Rscript to the PATH (#20)
  • Update Rtools40 (#14)
  • Set default CRAN mirror to cloud, in addition to RSPM, potentially (#11)
  • Install gfortran on macOS (#21)
  • Install system utilities on macOS (#22)
  • Support Rtools42 on Windows (#23)

EDIT: we don't necessarily need these now, they can be implemented later:

For setup-pandoc:

  • Install pandoc (#16)

For setup-tinytex:

  • Install tinytex (#17)

macOS: allow debugging

And maybe another subcommand to allow core files. E.g.

rim system allow-debuggers
rim system allow-core-dumps

allow-core-dumps should set the write access to the /cores directory, in addition to setting the entitlement.

points to default r version?

A nice tool I never imaged!

I have a suggestion here.

C:\Users\Administrator>rim list
4.1.2
4.1.3

When 4.1.3 set as default, adding a mark may be more readable, so no need to call rim default.

C:\Users\Administrator>rim list
4.1.2
4.1.3 (default)

Also, I just tried the rim, I found after I install the 4.1.3, the RStudio use 4.1.3 already, however, rim did not point 4.1.3 or 4.1.2 as default. I don't know if they should be consistent.

Add support for ubuntu-based distros.

I'm running elementary OS 6.1 which is built on Ubuntu 20.04.3 LTS. Runing rim add results in this error:

thread 'main' panicked at 'Unsupported distro: elementary 6.1, see rim list-supported', src/linux.rs:525:5

I don't know if there's a safe programmatic way to check if any particular distro is based on Ubuntu so the solution could be to allow the user to bypass the auto-discovery and specify the version to install (under their own risk, naturally).

If it helps, my /etc/os-release looks like this:

NAME="elementary OS"
VERSION="6.1 Jólnir"
ID=elementary
ID_LIKE=ubuntu
PRETTY_NAME="elementary OS 6.1 Jólnir"
LOGO=distributor-logo
VERSION_ID="6.1"
HOME_URL="https://elementary.io/"
DOCUMENTATION_URL="https://elementary.io/docs/learning-the-basics"
SUPPORT_URL="https://elementary.io/support"
BUG_REPORT_URL="https://github.com/elementary/triage/issues/new"
PRIVACY_POLICY_URL="https://elementary.io/privacy-policy"
VERSION_CODENAME=jolnir
UBUNTU_CODENAME=focal

system allow-debugger only works on Monterey

Apparently. On Big Sur I get

Updating entitlements of /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/bin/exec/R
thread 'main' panicked at 'Cannot query entitlements:
   codesign: unrecognized option `--xml'
Usage: codesign -s identity [-fv*] [-o flags] [-r reqs] [-i ident] path ... # sign
       codesign -v [-v*] [-R=<req string>|-R <req file path>] path|[+]pid ... # verify
       codesign -d [options] path ... # display contents
       codesign -h pid ... # display hosting paths
', src/macos.rs:322:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Some questions on the `R-*` quick links that get added

I had a few questions about the quick links that got installed when I did rim add release. I will refer back to the results of rim list, so here is that for now:

$ rim list
.DS_Store
3.3
3.6
4.0
4.1
4.2
  1. (Ah, this is #36) What is up with the .DS_Store one? It shows up in rim list and I get:
Adding /usr/local/bin/R-.DS_Store -> /Library/Frameworks/R.framework/Versions/.DS_Store/Resources/bin/R

Screen Shot 2022-04-20 at 5 42 35 PM

  1. Why does R-4.0 get added and then removed?
Adding /usr/local/bin/R-4.0 -> /Library/Frameworks/R.framework/Versions/4.0/Resources/bin/R
...
Cleaning up /Library/Frameworks/R.framework/Versions/4.0/Resources/bin/R
  1. Why do all quick links link to R 4.1.3? Look at the opened version of R here.

Screen Shot 2022-04-20 at 5 45 10 PM

Why does rim add an R package library folder?

i.e. it created /Users/davis/Library/R/x86_64/4.1/library when I ran rim add release.

Is it just good practice to keep your CRAN R package library separate from the base R packages? I've never used a separate library before.

I guess R knew to find it there because of this?

> Sys.getenv("R_LIBS_USER")
[1] "~/Library/R/x86_64/4.1/library"
> .libPaths()
[1] "/Users/davis/Library/R/x86_64/4.1/library"                     
[2] "/Library/Frameworks/R.framework/Versions/4.1/Resources/library"

Panic on `rim system` without any additional args

$ rim system
thread 'main' panicked at 'Usage: rim system [SUBCOMMAND], see help', src/main.rs:56:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I was expecting it to actually print out the help like what happens when I just type in rim

Can work without root permission

Hi,

Today I tried to install rim in a HPC without root permission. I found it require sudo to install R release. Could rim work for such case?

Best,

Shixiang

macOS: do not change the default version when installing

This is hard because the installer simply overwrites the symbolic link. One possible solution is creating a volume, installing there, removing the link, and then moving the files to the / volume.

Another possible way is to extract the .pkg file with pkgutil --extract, removing the symlink, and then pack it back up with pkgutil --flatten. Well, except that the contents is in a big Payload file after extracting, which is a cpio file, so we would need to remove it from that. Also, if there is some integrity check on the .pkg then this will not work.

A technically worse but probably good enough approach is to watch the disk while the installer is running and as soon as the /Library/Frameworks/R.framework/Versions/Current link is (re)created, we set it back to the previous default.

Manual page on macOS and Linux

Using clap_mangen it is already possible to generate it automatically, but it still has some glitches, so we'll need to wait a bit.

Windows: list rtools versions

Maybe the whole rtools stuff should be a separate command? Or keep it in rim add, and have rim list --rtools as well?

Release rim 0.3.0

  • Make sure README has the correct command list.
  • Make sure version number is updated everywhere:
    • Cargo.toml
    • Cargo.lock (run cargo build)
    • src/args.rs
    • rim.iss
    • NEWS file
    • README.Rmd
  • Make sure CI is OK
  • If needed, commit to to have a CI build with the right version number.
  • Build README:
    Rscript -e 'rmarkdown::render("README.Rmd")'
    
  • Update NEWS header to remove (not released yet)
  • Build signed and notarized macOS packages locally:
    export AC_PASSWORD=...
    sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
    make clean
    make macos
    
  • Download the artifacts for the new version for Windows & Linux (x2)
  • Create tag for the current version, push to GH.
  • Create release on GH, add the installers.
  • Test installers.
  • git commit with the NEWS and README updates, update tag, push to GH,
    --tags as well.
  • Update homebrew repo.
  • Update choco package.

Resolve is broken?

❯ rim resolve release
thread 'main' panicked at 'byte index 8 is out of bounds of `release`', src/macos.rs:429:35
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

`rig ls` lists additional directories that are not R versions

Tested on Linux/Ubuntu 22.04 with rig 0.3.1 pre-release.

❯ rig --version
RIG -- The R Installation Manager 0.3.1
❯ pwd
/opt/R
❯ ls
4.1.3  4.2.0  current  etc
# current is a symlink to 4.2.0, as expected
❯ rig ls
4.1.3
4.2.0 (default)
etc

I personally use /opt/R/etc for global Rprofile.site/Renviron.site and symlink those into respective R version directories to set some options.
This workflow is not ideal, I know (haven't found a neater solution, but I wrote my helper scripts and, well, "it works").

In general I think it seems reasonable to expect rig ls to e.g. only show directories starting with a digit, e.g. matching $\d or \d\.\d\.\d etc.

In a previous version I also noticed rim ls listing a .DS_Store file on macOS, but this appears to not be an issue anymore.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.