An R environment for Windows
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
REnPortable
README.md
REnPortableAppFolder.png

README.md

REnPortable

A portable R environment for Windows

Introduction

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.

Getting started

  1. 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.
  2. You can download the REnPortable zip file and unzip to any place on a Windows 64-bit machine, USB, or external drive.
  3. 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).
  4. 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.
  5. 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.

Folder structure

App

  1. AppInfo – files for portability of REnPortable, there is no reason to edit these unless you know what you are doing.
  2. Rbase – where to put the R(base) program files (and updated versions of R). Updated R base packages are saved here.
  3. RStudio – where to put the RStudio program files (and updated versions of RStudio).
  4. Rtools – where to put the Rtools program files (and updated versions of Rtools).

This what the correct App folder structure should look like:

App folder structure

Data

  1. R – various R files that are copied to your Windows profile under \Users\[username]\AppData\Roaming\R when you start REnPortable and then deleted when you close REnPortable.
  2. RBase – copy of the Renviron.site file 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.
  3. RData – the working directory\folder for R and RStudio, e.g. R_USER and HOME.
  4. 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.
  5. RStudio – various RStudio preference files are copied to your Windows profile under \Users\[username]\AppData\Roaming\RStudio when you start REnPortable and then deleted when you close REnPortable.
  6. RStudio-Desktop – various RStudio preference files are copied to your Windows profile under \Users\[username]\AppData\Local\RStudio-Desktop when you start REnPortable and then deleted when you close REnPortable.
  7. 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).
  8. Temp – temporary files for R/RStudio (I haven't seen anything saved there yet but who knows?).

Other

Various files for portability, there is no reason to edit these unless you know what you are doing.

Install RStan

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.

  1. You can, if you wish, verify that Rtools can be used in R.
  2. You do NOT need to anything under the two headings below because it has already been done for you.
  3. You can really start at Installing RStan but open REnPortable rather than R or RStudio.