RStudio on Metworx


This article gives an overview RStudio on Metworx.

Introduction to /data

Your workflow includes an attached disk called /data: this is where your home directory is located. /data is a local disk attached solely to the head node and mounted on compute nodes. This means everything in /data or your home directory is available everywhere on your workflow (both head and compute nodes).

We recommend you always work somewhere under /data.

RStudio directory

When launching RStudio within your workflow, you are automatically directed to your home directory within /data (/data/home/<yourname>). You can confirm the directory structure either within the RStudio Files pane or by typing pwd in a terminal window.

w mtx 1

RStudio for Project Work

The RStudio server can be used to access much of the non-graphical software Metworx has to offer. For example, it can be used for editing text files, including files in other languages or NONMEM® control streams.

RStudio Terminal

The terminal available in RStudio is a full Linux terminal. You can use multiple terminals as needed and swap between them if one terminal is busy.

RStudio Sessions

You can make multiple RStudio sessions and open them in multiple different windows. This allows you to swap between sessions with different projects or have multiple sessions within the same project.

w mtx 2

Uploading and Downloading Data

Single file uploads or downloads are simple in the RStudio interface (although it does have a gigabyte limit per transfer).

To upload a file from your laptop to your workflow, click Upload, select the file you wish to upload, navigate to the appropriate directory and click OK.

To download a file from your workflow to your laptop, select the file or file folder within the file viewer pane, then go to More and click Export, name the file appropriately, and Download the file to your machine.

w mtx 3

Be cautious when using this download functionality though, because there is no backup. This is a good method if you need quick access to a file, for example, to add to a report or slide deck. For downloading and storing data/files with backup/trace-ability, you should store those files to a shared location.