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 0
  • Step 1
  • Step 2
  • Step 3
  • Step 4

Was this helpful?

  1. Software
  2. Changing Default Package install locations on Windows

R (CRAN Packages)

Step 0

Follow this step only if you have already installed R packages on this workstation. Otherwise, skip to the next step.

Open RStudio and run the command .libPaths() inside the console. Copy the line that starts with C:/Users . This is the current location where user-installed packages are located. Paste this in the Address bar of the Windows File Browser. Keep this Window open

Step 1

Identify the new location for installing R packages. Here, we will assume it is E:\R_packages\3.6 .If you use two different versions of R, you will to choose different directories for each version.

Step 2

  1. Open RStudio

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

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

R_LIBS_USER="E:\\R_packages\\3.6"

  1. Save this file

  2. Restart RStudio to see the change in effect

Step 3

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

Step 4

If you have performed Step 0, follow this step. Otherwise, your setup is complete.

Copy the contents of the folder from Step 0 to the new folder from Step 1. Run the command installed.packages() or library() to verify that the packages are available.

PreviousPython (Pypi packages)NextStata packages

Last updated 1 year ago

Was this helpful?