A portable R environment for Windows.
REnPortable is a portable 64-bit only R environment for Windows. It was put together using the PortableApps.com launcher but is not endorsed by and does not fully comply with all PortableApps.com requirements.
At a minimum, REnPortable 4.5 needs extracted copies of R (base) 4.5+ and RStudio Desktop 2025+. Optionally, you can include copies of TinyTex, Rtools45, CmdStan 2.36+, and PortableGit. REnPortable was tested on Windows 11 Pro (x64). No support is offered for any of these programs; please use the relevant program's support pages.
- The extracted size of R and RStudio is approximately 1.25 GB. When you include Rtools45 (~3.0 GB), CmdStan (~1.1 GB), and TinyTex (~270 to 620 MB) altogether this is approximately 6.5 GB. You will want to add R packages and you will need room for these too. For example, my R packages library is currently ~1.3 GB.
- You can download the REnPortable zip file and unzip to any place on a Windows machine, USB, or external drive.
- If you have installed current versions of the various programs, you can copy the files for each into the appropriate folders in the Apps directory (see Folder structure below).
- If you have not installed the programs, you will need to install them, copy the program files to the correct folders in REnPortable and then uninstall the programs. RStudio Desktop can be downloaded as a zip file and unzipped into the appropriate RStudio folder.
- Run
REnPortable42.exe.
Note - When you start REnPortable, RStudio may ask you for the version of R you wish to use. Please select the version of R that is in \App\Rbase45 (see folder structure below); if you do not have R installed, this should be the only version listed.
Note - When it is time to update R, Rtools, RStudio, and other program files, it is usually best to delete the old files first and then copy/paste the new ones. This prevents old, unused files or versions of files from causing problems.
The R, Rtools, and RLibrary folders are named with R's major and minor version number (e.g. 45 for version 4.5) appended because sometimes you may want to have access to and be able to run more than one version of R, Rtools, and associated packages in the library.
- AppInfo – Files for portability of REnPortable, there is no reason to edit these unless you know what you are doing.
- CmdStan – (Optional) Unpack CmdStan here before building. You can comment out all the lines in
\CmdStan\install-tbb.batbecause the path is already set for you. - PortableGit – (Optional) Where to put the PortableGit files.
- Rbase45 – Where to put the R(base) program files (and updated versions of R). Updated R base packages are also saved here.
- RStudio – Where to put the RStudio program files (and updated versions of RStudio).
- Rtools45 – (Optional) Where to put the Rtools45 program files (and updated versions of Rtools42).
- TinyTex – (Optional) For TinyTex files. If you install TinyTex from the
tinytexpackage in R/RStudio (install_tinytex(force = TRUE, dir = tinytex_root(), add_path = FALSE)) the main application files will go here.
- RData – The working directory\folder for R and RStudio, e.g.
R_USERandHOME. - RLibrary45 – Contributed R packages are saved to this folder (i.e.
R_LIBS_USER) to separate them from the R program. - Settings – You probably do not need to change anything in this folder unless something goes wrong. Most of the settings files and folders are copied to the user profile when REnPortable starts. When REnPortable closes, the folders and files are moved back to their original locations. This means that start and close times may be slower than for installed programs.
- Bash – Contains the
.bash_historyfile. - Local – Copied to
.\Users\[username]\AppData\Local\- R – R crash-handler files.
- RStudio – General RStudio files.
- RStudio-Desktop – RStudio Desktop files.
- Rbase – Contains
Renviron.sitefile. The file has settings for R such as the location ofHOME,R_HISTFILE,R_USER, andR_LIBS_USER. This file is copied toApp\Rbase\etcwhen REnPortable starts and then moved back when REnPortable closes. - Roaming – Copied to
.\Users\[username]\AppData\Roaming\- R - For rsconnect.
- RStudio – RStudio preferences. The file
rstudio-prefs.jsonincludes the initial working directory for RStudio which is set to\Data\RData\in REnPortable.
- RStudioProfile – RStudio uses Electron and this is the profile folder. The file
config.jsonhas the path toR.exe, the main R executable. - TinyTex – Contains the
texmf.cnffile.
- Bash – Contains the
- Temp – Required for temporary files for R/RStudio (I haven't seen anything saved there yet but who knows?).
Various help and license files.