forked from daynefiler/rclass
-
Notifications
You must be signed in to change notification settings - Fork 3
Introduction to R Studio
Matthew Berginski edited this page Jul 9, 2018
·
1 revision
R Studio has a large collection of features, but it is not immediately obvious how to find and use them. I thought I would write up a few notes for the other instructors on what I like to introduce when students start using R Studio. It's a bit difficult to split out some programming ideas from an overview of R Studio (say what exactly the "Environment" tab is), but these ideas can be reiterated throughout the course. Ideally everyone will have a laptop to work along with you.
-
Introduce each of the panels and associated tab.
- Console panel: has two tabs - R interpreter and console
- R interpreter: the current R instance, can be used to test small pieces of code
- Make sure to point out tab completion and using the up/down arrows to retrieve old commands
- Console: Access the command line interface for your computer - probably won't be used in intro class *Text Editing Panel:
- Demo making a new R script, point out saving and source *Environment/History/Connections Panel: *Environment - list of current variables, demo viewing a simple data frame *History - previous commands, demo filtering with search box *Connections - this is for databases, right? probably won't be used *Files/Plots/Packages/Help/Viewer Panel: *Files - shows an interface to your file system, demo moving around the file system, using the "More" drop down to set working directory *Plots - shows the most recent plot produced *Packages - shows list of available packages *Help - shows help for R commands, demo looking up a command (say help("plot")) *Viewer - No idea what this does
- R interpreter: the current R instance, can be used to test small pieces of code
- Console panel: has two tabs - R interpreter and console
-
Brief Overview of project system
- Benefits of projects - separate out work on different analyses, can easily run multiple copies of R at the same time
- Demo using the upper right drop down options - Open the R Class github project and then another of your own
-
Interacting with code
- Show options in the Code menu: Comment/Uncomment Lines