INTERACTIVE
RUNNING R STUDIO IN GALILEO
Matthew Gasperetti
matthew@hypernetlabs.ioWritten and developed by
Alexander Berry
alexander@hypernetlabs.ioGetting Started with R Studio in Galileo
To get started with Galileo, log into your account using Firefox or Chrome and download our R example file from GitHub. The downloaded file consists of a .r file and a .csv file.
Let’s Have a Look at Our Files
The rMonteCarlo.R script conducts a linear regression, makes a simple plot, and then runs two Monte Carlo simulations.
The first Monte Carlo simulates tossing two dice and calculates the number of rolls that are 7 or less. The second Monte Carlo increases the number of iterations and runs the simulation in parallel.
Understanding the User Interface
When you log into Galileo, the first thing you’ll see is your Dashboard:

To run the rExample, start by navigating to the Missions tab using the side menu. On the Missions tab, click the Create a custom mission button.

Configure the mission by selecting the mission type. Choose R Language and then select the version: Batch Mode, Interactive (Jupyter), or Interactive (R Studio). This tutorial will use RStudio.
Next, give the mission a name and assign it to a default station to use. This tutorial will use the Linux station.
Click Next.

Set the default amount of computational resources for the mission. Choose the CPU resources, GPU resources, and memory resources.
Click Next.

Create the mission environment by choosing a username and password to access the RStudio session. You can also install any CRAN or Bioconductor repositories either by selecting them from the drop-down menu of popular repositories or by entering the packages’ names manually.
Click Next.
Finally, select the Cargo Bay you will use for this Mission. You can choose from the default Hypernet storage or an external storage provider. Galileo works seamlessly with cloud storage platforms such as Dropbox and Storj. Find out more about using these platforms here. Click Submit.
The Mission has now been created!
Running a Job and Collecting Results

You will now see the new Mission reflected in the Mission tab. Click Update Mission to add and edit the Mission’s files.

Upload the .r and .csv example files by clicking the Upload File button. You will see the files in the Mission interface.


Once the job’s status is “Job In Progress”, you are ready to open RStudio. Click Job In Progress and then click the tunnel URL.

Enter the Mission user name and password you set previously. You will then see the noVNC prompt. Click Connect.
You are now using RStudio in Galileo! It works just like RStudio on your desktop, and you have immediate access to the files you uploaded as part of the Mission.

Once you have finished working in RStudio, navigate back to the Mission tab and open the three-dot menu in the Jobs progress panel. Stop the job by clicking Stop Job.
