/
Become familiar with the R Studio interface
Become familiar with the R Studio interface
Log onto the DataSHIELD Training Environment
The R Studio Interface
- Open up R studio: The screen is split into four quadrants
Interface
Top left is where R scripts will open, and be available for you to edit and save.
Top right includes history and variables you have created in your current session.
Bottom left is the R console you can run commands directly here after the cursor >.
Bottom right is the file explorer, plotting screen, packages lists and help files.
Start a new script
Open up a new script by selecting from the top left icon for New File
- Select
R Script.
- A script is a record of the analyses we are working on, and typically will run again.
- Annotations in the script, called comments, aid users in understanding the script and are denoted by
#
at the beginning of each line. Comments do not run in the console. - It is good practice to put a description at the top of your script: what it is for, author, date, dataset etc used. This is will serve as a reminder as to what the script is for in the future.
- Complete a description of your script and then save it as a
.R
file in your folder by clicking the save icon ( a blue disk).
Next section
Related content
DataSHIELD Wiki by DataSHIELD is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Based on a work at http://www.datashield.ac.uk/wiki