-
Ben Anderson authoredBen Anderson authored
Using R/RStudio on the SVE service
What is the SVE?
A windows virtual desktop
The SVE offers two services:
- Win 10 Student service - this one has research & academic software suites such as RStudio etc. But it does not have persistence. This means that any packages you install or any repos you clone into your local space will vanish when you log out. The only exception is if you:
- clone the repos to your MyDocuments/OneDrive account
- work out how to use your Windows profile to 'host' the packages (or do some nifty work with the
renv
package)
- Win 10 Staff service - this is a generic staff service intended for admin & professional staff use (for now). While it does have persistence, it does not have RStudio installed...
Why would I use the SVE?
- The 'Student' service hosts most of the applications you'll need including RStudio etc
- It offers easy access to data folders such as J:// as you are effectively working 'on campus'. This makes data loading fast. Well... faster than doing it over your home broadband.
- You can easily access your oneDrive folders.
- The virtual PC instance you log in to has reasonable memory allocation so unless you have huuuge datasets you should be OK.
But:
- No R package or repo persistence (see above)
- It does not seem to be able to 'mount' Sharepoint/Teams folders - so you cannot easily load data held in them
Git
Git is installed on the SVE - yay! You do know how to use Git, right? No? try starting here.
Git authentication
HTTPS vs SSH? It's up to you but some argue that HTTPS is easy to get you going.
Whatever, you will need to authenticate the SVE (local machine) with Gitlab/GitHub. You can do this via HTTPS, entering your username and password in each session on the SVE (not a big deal)... or by using an RSA key. This RSA key should now be persistent on the SVE (it didn't used to be before the SVE upgrade).
RStudio in SVE
Packages
See note above re persistence.
If you need to add new packages use the install.packages() function. This seems to be able to bypass a permissons issue in C:/Apps/RLibraries which causes the normal the RStudio GUI/tab method to fail.
Better yet use the loadPackages() function developed at SERG :-)
Even better, consider using the renv
package.
Using Git within RStudio
We recommend storing your local (working) project repositories within your Documents
folder on the university filestore as storing Git repositories within cloud-synced folders may cause problems.
Git does seem to have some weird behaviour on the SVE to be aware of ... the correct operation of Git witin RStudio on the University network requires some careful working practices with respect to file paths.
Using the University filestore for project (working) files requires use of the mapped file path filestore (H:)
not the Documents
shortcut in the Quick access
group of Windows Explorer.
While these two paths refer to the same physical location for your documents folder, they are resolved differently i.e. H:\
vs \\filestore.soton.ac.uk\users\xxmyusernamexx\mydocuments
. When a project is started in RStudio from the latter location, the Git repository is not recognised correctly. As a result, the Git
tab will be missing from the Environment pane.
Loading a project from Documents
in Quick access
group, the figure shows no Git
tab and thus no access to Git processes thru the RStudio IDE:
Loading project from the same folder via H
(mapped drive), figure shows the Git
tab is now present and Git commands now accessible:
This problem seems to be limited to the Environment pane within the RStudio IDE as running Git commands through the Terminal (Console pane) pick up the repository correctly (as shown in image below).
So using Git through the Terminal is unaffected by the path used to open the project.