Rating: 4.3/5 Best for: R developers, bioinformaticians, data scientists managing multiple R versions or library configurations. GitHub: gmcmacran/switchr 1. Overview & Core Philosophy Switchr (originally part of the SwitchBox ecosystem) is an R package designed to solve a chronic problem in R development: dependency hell and version isolation .
Unlike Python’s virtualenv or conda , R lacks a first-class, built-in mechanism for per-project library stacks. Switchr fills this gap by providing programmatic switching between sets of installed packages (called "sandboxes" or "library stacks" ). It allows you to maintain, e.g., a "Production 3.6" stack, an "Experimental tidyverse" stack, and a "Legacy CRAN 2020" stack on the same machine. | Feature | Description | |---------|-------------| | Multiple sandboxes | Isolated library trees managed independently. | | Transparent switching | switchTo("sandbox_name") changes the .libPaths() without restarting R. | | Manifest-based | Record exact package versions + sources (CRAN, GitHub, Bioc). | | Install from manifest | Recreate an environment anywhere ( install_packages(manifest) ). | | No sudo/root | Fully user-level; all packages installed to user-defined paths. | | Integration with GRANBase | Can create local CRAN-like repositories for controlled builds. | 3. Installation & Basic Usage # Install from CRAN (stable) install.packages("switchr") Or development version remotes::install_github("gmcmacran/switchr") Create a new sandbox switchr::makeSandbox("project_xyz") Activate it switchr::switchTo("project_xyz") Install packages (they go into the sandbox) install.packages("dplyr") BiocManager::install("DESeq2") Later, switch back to global/default switchr::switchTo("default") View all sandboxes switchr::listSandboxes() 4. Strengths (What Works Well) ✅ True isolation Switchr does not just change libPaths – it maintains completely independent library/ directories, including compiled bytecode. No cross-sandbox leakage. ✅ R version agnosticism You can maintain a sandbox built under R 3.6 and another under R 4.2. Switching sandboxes is safe even between minor R versions (though compiled code may need reinstallation if the R ABI changes). ✅ Reproducibility via manifests manifest <- switchr::writeManifest() # manifest is a data.frame with Package, Version, Repository, Sha (for GitHub) You can commit this manifest to Git, then on another machine: switchr
switchr::install_packages(manifest) This is a lightweight alternative to renv or conda-lock . Because everything lives under ~/R/sandboxes/ , you never accidentally install.packages() into the system library or a production environment. 5. Weaknesses & Pain Points ❌ Stale maintenance As of 2024-2025, Switchr has low commit activity . The last significant updates were ~2019-2021. It still works with modern R (4.3/4.4), but some edge cases with Bioconductor 3.18+ or GitHub rate limiting may appear. ❌ No dependency locking by default Unlike renv (which creates a strict renv.lock with exact hashes), Switchr's manifest records versions but not recursive dependencies. A package update in a dependency can still break your sandbox if you rebuild from manifest without freezing CRAN. ❌ Poor Windows support While it runs on Windows, path handling can be brittle. Long paths, spaces in user names, or antivirus interference with symlinks cause frequent issues. Switchr is most stable on Linux/macOS . ❌ Learning curve for advanced features Concepts like Sandbox classes (ReferenceClass-based), pkgType control, and GRAN integration are powerful but under-documented. The vignettes cover basics but not debugging sandbox corruption. ❌ Conflicts with RStudio's "Projects" If you use RStudio’s .Rproj + renv, Switchr’s switchTo() may override RStudio’s automatic libPath, leading to confusion. Workaround: disable renv autoloading. 6. Comparison: Switchr vs Alternatives | Tool | Isolation | Lock file | R version mgmt | Active dev | Learning curve | |------|-----------|-----------|----------------|------------|----------------| | Switchr | ✅ Full | ⚠️ Partial (no recursive lock) | ❌ No (uses system R) | Low | Medium | | renv | ✅ Full | ✅ Strong ( renv.lock ) | ❌ No | High (RStudio) | Low-Medium | | conda | ✅ Full | ✅ environment.yml | ✅ Yes (via r-base ) | High | High | | packrat (deprecated) | ✅ Full | ✅ Weak | ❌ No | None | Medium | | checkpoint | ❌ (date-frozen CRAN only) | ❌ | ❌ No | Low | Low | Rating: 4
This LMC simulator is based on the Little Man Computer (LMC) model of a computer, created by Dr. Stuart Madnick in 1965. LMC is generally used for educational purposes as it models a simple Von Neumann architecture computer which has all of the basic features of a modern computer. It is programmed using assembly code. You can find out more about this model on this wikipedia page.
You can read more about this LMC simulator on 101Computing.net.
Note that in the following table “xx” refers to a memory address (aka mailbox) in the RAM. The online LMC simulator has 100 different mailboxes in the RAM ranging from 00 to 99.
| Mnemonic | Name | Description | Op Code |
| INP | INPUT | Retrieve user input and stores it in the accumulator. | 901 |
| OUT | OUTPUT | Output the value stored in the accumulator. | 902 |
| LDA | LOAD | Load the Accumulator with the contents of the memory address given. | 5xx |
| STA | STORE | Store the value in the Accumulator in the memory address given. | 3xx |
| ADD | ADD | Add the contents of the memory address to the Accumulator | 1xx |
| SUB | SUBTRACT | Subtract the contents of the memory address from the Accumulator | 2xx |
| BRP | BRANCH IF POSITIVE | Branch/Jump to the address given if the Accumulator is zero or positive. | 8xx |
| BRZ | BRANCH IF ZERO | Branch/Jump to the address given if the Accumulator is zero. | 7xx |
| BRA | BRANCH ALWAYS | Branch/Jump to the address given. | 6xx |
| HLT | HALT | Stop the code | 000 |
| DAT | DATA LOCATION | Used to associate a label to a free memory address. An optional value can also be used to be stored at the memory address. |