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.2 needs extracted copies of R (base) 4.2+ and RStudio Desktop 2021.09.0+. Optionally, you can include copies of TinyTex, Rtools42, and CmdStan 2.29+. REnPortable was tested on Windows 10 Pro (x64) and Windows 11. 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 800 MB. When you include Rtools42 (~3.9 GB), CmdStan (~1.0 GB), and TinyTex (~270 to 525 MB) altogether this is approximately 6.2 GB. You will want to add R packages and you will need room for these too. For example, my R packages library is currently ~900 MB.
- 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\Rbase42
(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, Rtools42, 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.
- 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.bat
because the path is already set for you. - Rbase42 – 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).
- Rtools42 – (Optional) Where to put the Rtools42 program files (and updated versions of Rtools42).
- TinyTex – (Optional) For TinyTex files. If you install TinyTex from the
tinytex
package 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_USER
andHOME
. - RLibrary42 – 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_history
file. - Local – Copied to
...\Users\[username]\AppData\Local\...
- R – R crash-handler files.
- RStudio – General RStudio files.
- RStudio-Desktop – RStudio Desktop files.
- Rbase – Contains
Renviron.site
file. The file has settings for R such as the location ofHOME
,R_HISTFILE
,R_USER
, andR_LIBS_USER
. This file is copied toApp\Rbase\etc
when 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.json
includes 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.json
has the path toR.exe
, the main R executable. - TinyTex – Contains the
texmf.cnf
file.
- Bash – Contains the
- Temp – Required for temporary files for R/RStudio (I haven't seen anything saved there yet but who knows?).
Various files for portability, there is no reason to edit these unless you know what you are doing.