Download presentation
Presentation is loading. Please wait.
1
Getting Started with R
2
Download and install locally from
TACC ssh stampede.tacc.utexas.edu % module load R % R There are two versions available, R , using default GCC compiler, BLAS library etc. R 3.0.1, using intel compiler, MKL library, faster, but may have problem when using other package requires GCC compilation.
3
R command line interface on cluster
So here is the basic of R console. It’s just a command line interface. All command in the form of a function for example. For example, you need help() for a particular function you can type in the help and put the function you seek as a parameter.
4
R Console interface on Mac
Here is the screenshot of the R console interface on my Mac laptop. It’s a step up from the just command line interface, In addition to just you can open up your R code. It is the same console you see before. You get some extra helpful tools on the top such as showing up your command history. The R GUI interface also comes with source code editor. So you can go to the file and open an existing source file. You will get what you typically get from an IDE with color coding to different part of the code, line number etc. The basic R GUI also include workspace viewer which gives you quick view that all the object you may have created during your R session. and a data manager view showing the dataset has been included in the enviroment. If your code has any graphical output the R GUI can also open them and display with them.
5
RStudio: A better user interface of R
RStudio is a open source graphical user environment for R users. RStudio allow users to Interactive code development Run R scripts Exploring local file system Viewing data file Viewing graphical output from R …
6
RStudio GUI Source Editor + Interactive highlight+run Session History
Interactive Console Here is the typical Rstudio GUI. The default view splits into four parts. On the left, You have the source editor on the top and the interactive console on the bottom. Those are the same two view as the default R GUI. however, R studio provide more developer friendly features. Comparing to basic R GUI, you can also highlight a subset of line and just run those. On the bottom left, you have the standard interactive console. It is the exactly the same as in the command line interface, RGUI. On the right, it shows a lot more helpful information. On the top right, you can view session related data, like the history of the current session similar to the history window you get from the standard R GUI. You can also click the environment tab and see data and variables currently using by the session. On the bottom right, there is a list of tabs. for exploring the external file system, plots, packages installed etc. Plots Management
7
RStudio GUI Data Viewer Variable/Environment Viewer
For the right hand, you can click on different tabs. This screenshots show the enviroment tab. It is sort of a combination between the workspace view and data view from the R GUI. A nice feature is you can clikc import datasets to directly load a structured file in it. It will pop up a wizard like window for you to choose the data file format Once the file is opened, you can see them in the list, as well as open them like a table in the data viewer on the left hand side. On the bottom right, you also can see your directory and double click a source file, or data file to load them, Ok installing/manage package from there. Package Management File Management
8
RStudio GUI Project + Source Control Integration
The bottom right panel also provide an formated HTML view for all the pakcage informaiton and helps. You can select and browsing them as you view a website. You may also using the help function to call for help through the interactive console. However, instead of displaying the help in the console, it is now will shows up side by side. Finally, you could export/import your Projects from/to a file format or version control system. Currently supporting both subversion and GIThub. Rstudio, has more features and best suited for code development and debuging. It can also be used as a tool for analysis since it allows user to interact with the data and corresponding results much more convenient. Interactive Help Interactive Help
9
Web interface of Rstudio on Maverick
Users can run an interactive web session with RStudio using maverick.tacc.utexas.edu The Job script template is in /share/doc/slurm/job.RStudio On Maverick, Submitting the job with Sbatch /share/doc/slurm/job.Rstudio After the job is running, a URL will be available for connection e.g.
10
Then visit the URL and log in with your account credential
11
Now vola, you have the full featured Rstudio running within your browser window.
The web browser is just the front end, all the actual computations are done on the compute nodes assigned. You can close the current browser, and your job will be still running on the compute nodes, You can log back in some time later, with a different computer, different browser.
12
Even better Starting session through web portal
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.