RStudio and R from PSU campus Windows computers

The motherboard on my laptop died a few days ago, and I’ve been using Penn State’s various campus computing labs to tide me through until my new machine arrives. Campus computers work fine searching articles, reading, etc., but figuring out how to comfortably run R (and RStudio) from them was somewhat more challenging. While the campus computers all have R installed, they don’t have RStudio, and I couldn’t even find the old-school default GUI that distributes with R.

Upon launching R locally on the campus Windows machines, a terminal (aka “Command Prompt” in Windows) opened with R running. This would have been fine in a pinch: since most of my code is functionalized, I could source it in and run things as I wanted in the terminal. However, I also wanted a decent text editor to comfortably edit the source files. I usually use vim on Linux (full disclosure: I really like RStudio, but running R from the terminal using the vim-R-plugin is my preference); on the PSU windows machines my text editor options were Notepad (no syntax highlighting), jEdit, and PSPad Editor (both found under All Programs -> Utilities -> Editors), neither of which had an R plugin for syntax highlighting available. Gah!

As luck would have it, I’ve been using the PSU HPC clusters for a few years, and attended a seminar on using R on the clusters earlier this fall. Usually when I use the clusters under Ubuntu, I ssh in from my machine, use scp to move a source file, a run file, and a PBS file that I’ve constructed and checked locally to my cluster space, and then run the PBS file on the cluster using qsub. I’d never tried editing code directly on the clusters themselves.

However, at the seminar I learned that one could access and interact with Hammer remotely: you can launch RStudio on Hammer, and edit and run code directly there, as I usually do from my own machine. AND this is easy to do from the public machines on campus! Thank goodness! Here are the steps:

1) Contact RCC and check to be sure you have space on Hammer (I think we’re all given space by default, but it’s worth checking just in case). In my experience, they’re really quick (minutes to hours) about setting up accounts when once requested.
2) Launch Exceed On Demand on the Windows Desktop. Here is a good description of using Exceed on Demand under Windows and OS X from RCC. You’ll be prompted to designate the following:

  • host (use hammer.rcc.psu.edu; to the best of my knowledge, Hammer is the only cluster for which this works)
  • User ID (your normal PSU ID)
  • Password (your normal PSU password)

3) You’ll be prompted to fill out a dialogue box about how you want to interface with Hammer (I’m currently using Xconfig = Seamless_Mode and Xstart = Terminal.xs); both seem to work fine.  Click “Run”.

4) A terminal will open on your machine.  To load and launch RStudio, do this:

module load rstudio
rstudio

And lo, RStudio launches on your garden-variety PSU campus machine! No more procrastinating!

 

 

Leave Comment

Your email address will not be published. Required fields are marked *