Difference between revisions of "RStudio"

From UFRC
Jump to navigation Jump to search
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Software]]
+
[[Category:Software]][[Category:Statistics]]
 
{|<!--CONFIGURATION: REQUIRED-->
 
{|<!--CONFIGURATION: REQUIRED-->
 
|{{#vardefine:app|rstudio}}
 
|{{#vardefine:app|rstudio}}
Line 21: Line 21:
  
 
<!--Modules-->
 
<!--Modules-->
==Required Modules==
+
==Environment Modules==
===Serial===
+
Run <code>module spider R</code> to find out what R environment modules that contain this application are available.
* {{#var:app}}
 
<!--
 
===Parallel (OpenMP)===
 
* intel
 
* {{#var:app}}
 
===Parallel (MPI)===
 
* intel
 
* openmpi
 
* {{#var:app}}
 
-->
 
 
==System Variables==
 
==System Variables==
* HPC_{{#uppercase:{{#var:app}}}}_DIR - installation directory
+
* HPC_{{uc:{{#var:app}}}}_DIR - installation directory
 
<!--Configuration-->
 
<!--Configuration-->
 
{{#if: {{#var: conf}}|==Configuration==
 
{{#if: {{#var: conf}}|==Configuration==
Line 44: Line 34:
 
RStudio is an integrated development environment (IDE) for R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, debugging and workspace management.
 
RStudio is an integrated development environment (IDE) for R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, debugging and workspace management.
  
;Note:
+
The recommended way to run RStudio on HiPerGator is to start it in [[Open_OnDemand|Open OnDemand]].
:If you see your mouse cursor offset from the real location in the RStudio window check your RStudio editor font preferences. A known good font is 'DejaVu Sans Mono'.
 
  
The easiest way to launch RSTudio within a gui SLURM session is to use the launch_xpra_rstudio command. For example:
+
When RStudio starts the file browser will be limited to your home directory. To navigate to /blue or /orange, there are two main options:
<pre>
 
[jdoe@gator ~]$ module load rstudio
 
[jdoe@gator ~]$ launch_xpra_rstudio
 
  
Starting rstudio under Xpra in a SLURM gui session.
+
=== Option 1: Create a symlink to your target directory in home===
  
Requested rstudio memory size: '4gb'
+
E.g.
 +
$ cd
 +
$ ln -s /blue/MYGROUP/$USER/ blue
 +
where MYGROUP is your real group name
  
Requested '1' processor cores
+
After you create a symlink you'll be able to go into the 'blue' directory in the RStudio file browser under home.
  
Requested '8' hours for the session
+
===Option 2: Change your working directory using R console===
  
Waiting for the job to start as '-n' (nowait) argument was not specified.
+
* Click on the '[Gear] More' menu in the RStudio file browser and choose 'Synchronize Working Directory'
 +
* Run
 +
setwd('/blue/MYGROUP/MYUSER/')
 +
in the RStudo REPL and the file browser should immediately reflect the new working directory.
  
The rstudio job '123456' has started. Listing all active xpra sessions.
+
[[File:RStudio setwd synchronize.png]]
 +
|}}
  
Refreshing the session list for jdoe to remove stale sessions
+
==RStudio on ResVault==
 +
To launch RStudio on ResVault use the command <code>$ rstudio --no-sandbox</code> and if you have additional drives linked to your VM, bind mount those drives with the flag <code> -B /drives/drive_name</code>
  
List of active Xpra sessions for jdoe:
 
  
Session: i111a-s222.rc.ufl.edu:3713
 
    Job ID: 123456, Name: RStudio
 
    Client command:
 
        xpra attach ssh:jdoe@i111a-s222.rc.ufl.edu:3713
 
</pre>
 
 
|}}
 
 
<!--Job Scripts-->
 
<!--Job Scripts-->
 
{{#if: {{#var: job}}|==Job Script Examples==
 
{{#if: {{#var: job}}|==Job Script Examples==

Latest revision as of 19:51, 18 July 2023

Description

rstudio website  

RStudio is an integrated development environment (IDE) for R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, debugging and workspace management.

Environment Modules

Run module spider R to find out what R environment modules that contain this application are available.

System Variables

  • HPC_RSTUDIO_DIR - installation directory

Additional Information

RStudio is an integrated development environment (IDE) for R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, debugging and workspace management.

The recommended way to run RStudio on HiPerGator is to start it in Open OnDemand.

When RStudio starts the file browser will be limited to your home directory. To navigate to /blue or /orange, there are two main options:

Option 1: Create a symlink to your target directory in home

E.g.

$ cd
$ ln -s /blue/MYGROUP/$USER/ blue

where MYGROUP is your real group name

After you create a symlink you'll be able to go into the 'blue' directory in the RStudio file browser under home.

Option 2: Change your working directory using R console

  • Click on the '[Gear] More' menu in the RStudio file browser and choose 'Synchronize Working Directory'
  • Run
setwd('/blue/MYGROUP/MYUSER/')

in the RStudo REPL and the file browser should immediately reflect the new working directory.

RStudio setwd synchronize.png

RStudio on ResVault

To launch RStudio on ResVault use the command $ rstudio --no-sandbox and if you have additional drives linked to your VM, bind mount those drives with the flag -B /drives/drive_name