Stronghold
HomeServicesDocumentationBlog
  • Highly Secure Computing (Stronghold)
  • Data Management
    • SFTP Data Transfers
      • Data Imports
      • Data Exports
    • HTTPS Direct Downloads
      • FastX 3
      • FastX 2
    • Data Storage
    • Globus Transfers
      • Windows Tenants
      • Adding New Users
  • Usage
    • New Tenant Onboarding
    • Windows Environments
      • Access from Mac
      • Access from Windows
      • RDP Gateway from Mac
      • RDP Gateway from Windows
    • Linux Environments
      • FastX 3
      • FastX 2
  • Software
    • Windows Standard Software
    • Linux Standard Software
      • Julia
    • Package Archive Mirrors
      • BioConductor Mirror
      • CRAN Mirror
      • PyPI Mirror
    • Install R/Python Packages from Local File
    • Jupyter Lab on Linux Workstations
    • Changing the temporary folder for softwares
      • SAS
      • STATA
      • RStudio
    • Changing Default Package install locations on Windows
      • Python (Pypi packages)
      • R (CRAN Packages)
      • Stata packages
  • Git
    • Git Sync
    • GitLab
  • Access & Security Groups
    • User Groups
    • Lifespan Staff Access
  • Multi-Protocol Access
    • Access Same Data from Windows and Linux Workstations
Powered by GitBook
On this page
  • Step 1:
  • Step 2:
  • Step 3:
  • Step 4:

Was this helpful?

  1. Software
  2. Changing the temporary folder for softwares

RStudio

RStudio by default saves all temporary files in the C:/ in Windows workstations. To prevent users from using too much space on the C:/ drive, storage quota per user is set for the C:/ drive on every Windows workstation. Users should follow the following steps to change the temporary directory so that they are not over their C:/ drive quota.

Step 1:

Open RStudio and run the command tempdir() . This will show you the current temporary folder. Open the folder in Windows Explorer and check if there are any abnormally large files (several GB). R should have deleted these files at the end of the session. You should be able to delete old files in this directory, later.

Step 2:

Identify the new location for the new temporary folder. It should NOT be in the C:\ . We recommend the data drive. Here, we will assume it is E:\R_Temp\ccvdemo2

Step 3:

  1. Open RStudio

  2. Run file.edit("~/.Renviron") inside RStudio console. This will open a text editor. It might be empty.

  3. Add this line in the text editor. Replace the path with your chosen path from step 1. Use two backslashes (\\) instead of one (\).

TMPDIR="E:\\R_Temp\\ccvdemo2"
TMP="E:\\R_Temp\\ccvdemo2"
TEMP="E:\\R_Temp\\ccvdemo2"

(R Documentation is unclear about the name of this variable. But setting all of them should work)

4. Save this file

Restart RStudio to see the change in effect.

Step 4:

To verify that the setup is complete run the command tempdir() inside RStudio console. You should see the new path in the list of paths.

PreviousSTATANextChanging Default Package install locations on Windows

Last updated 1 year ago

Was this helpful?