A portable R environment for Windows
REnPortable is a portable 64-bit R environment for Windows. It was put together using the PortableApps.com launcher but is not endorsed by and does not comply with PortableApps.com requirements.
Please note that to use REnPortable you need to supply your own 64-bit copy of R(base), Rtools, RStudio (Open Source Edition). REnPortable was tested with R v3.5.1, Rtools v3.4, and RStudio Desktop Open Source v1.1.453 & v1.1.456 on a Windows 10 (x64) machine. No support is offered for any of these programs -- please use the relevant support pages.
The reason for putting together REnPortable was to have a complete, portable R environment to learn R and RStan. Therefore, all the preliminary work is complete to install the RStan for Windows packages into REnPortable.
- The size of the 64-bit versions of R, RStudio, and Rtools together is approximately 1.1 GB. If you want to add other R packages you will need room for these too. For example, RStan plus dependencies adds another 350 MB (total ~1.5 GB on disk). You could save 500 MB by excluding Rtools but REnPortable has not been tested without Rtools and RStan will not work without Rtools.
- You can download the REnPortable zip file and unzip to any place on a Windows 64-bit machine, USB, or external drive.
- If you have installed 64-bit versions of R, Rtools, or RStudio, you can copy the program files for each into the appropriate folders in the Apps directory (see Folder structure below).
- If you have not installed 64-bit versions of R and Rtools you will need to install them (choose to install the 64-bit versions only), copy the program files to the correct folders in REnPortable and then uninstall R and Rtools. RStudio Desktop can be downloaded as a zip file and unzipped into the appropriate RStudio folder.
- Launch REnPortable.exe
Note: Every time you start REnPortable, RStudio will ask you for the version of R you wish to use. Please select the version of R that is in
...\REnPortable\App\Rbase (see below); if you do not have R installed, this should be the only version listed. This is a behaviour of RStudio and cannot be change (AFAIK).
Note: When it is time to update R(base), Rtools, and RStudio program files, it is usually best to delete the old files first and then copy/paste the new ones to prevent 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.
- Rbase – where to put the R(base) program files (and updated versions of R). Updated R base packages are saved here.
- RStudio – where to put the RStudio program files (and updated versions of RStudio).
- Rtools – where to put the Rtools program files (and updated versions of Rtools).
This what the correct App folder structure should look like:
- R – various R files that are copied to your Windows profile under
\Users\[username]\AppData\Roaming\Rwhen you start REnPortable and then deleted when you close REnPortable.
- RBase – copy of the
Renviron.sitefile that tells R where the working directory and user library are located, edit at your own risk. This folder structure was used in case there are further preference files or other requirements later.
- RData – the working directory\folder for R and RStudio, e.g.
- RLibrary – Contributed R packages are saved to this folder (i.e.
R_LIBS_USER) to separate them from the R program. If you install RStan, this is where the files will be saved rather than under
\App\Rbase. It means that R(base) can be updated independently of any contributed packages you add.
- RStudio – various RStudio preference files are copied to your Windows profile under
\Users\[username]\AppData\Roaming\RStudiowhen you start REnPortable and then deleted when you close REnPortable.
- RStudio-Desktop – various RStudio preference files are copied to your Windows profile under
\Users\[username]\AppData\Local\RStudio-Desktopwhen you start REnPortable and then deleted when you close REnPortable.
- Settings – a registry file to tell RStudio where to find R (added on start and deleted on close) and a file that contains the previous place REnPortable was launched from (required to maintain portability).
- Temp – 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.
If you have copied the program files for R, Rtools, and RStudio into the correct folders, then most of the instructions for getting RStan for Windows up and running do not needed to be followed.