Skip to content

conchra/REnPortable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 

Repository files navigation

REnPortable

A portable R environment for Windows.

Introduction

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.

Getting started

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

Folder structure

REnPortable\App folder

  1. AppInfo – Files for portability of REnPortable, there is no reason to edit these unless you know what you are doing.
  2. 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.
  3. Rbase42 – Where to put the R(base) program files (and updated versions of R). Updated R base packages are also saved here.
  4. RStudio – Where to put the RStudio program files (and updated versions of RStudio).
  5. Rtools42 – (Optional) Where to put the Rtools42 program files (and updated versions of Rtools42).
  6. 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.

REnPortable\Data folder

  1. RData – The working directory\folder for R and RStudio, e.g. R_USER and HOME.
  2. RLibrary42 – Contributed R packages are saved to this folder (i.e. R_LIBS_USER) to separate them from the R program.
  3. 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.
    1. Bash – Contains the .bash_history file.
    2. Local – Copied to ...\Users\[username]\AppData\Local\...
      • R – R crash-handler files.
      • RStudio – General RStudio files.
      • RStudio-Desktop – RStudio Desktop files.
    3. Rbase – Contains Renviron.site file. The file has settings for R such as the location of HOME, R_HISTFILE, R_USER, and R_LIBS_USER. This file is copied to App\Rbase\etc when REnPortable starts and then moved back when REnPortable closes.
    4. 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.
    5. RStudioProfile – RStudio uses Electron and this is the profile folder. The file config.json has the path to R.exe, the main R executable.
    6. TinyTex – Contains the texmf.cnf file.
  4. Temp – Required for temporary files for R/RStudio (I haven't seen anything saved there yet but who knows?).

REnPortable\Other folder

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

About

An R environment for Windows

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages