Get the full R scripts for this modules walkthroughs here:
A few common shortcuts in RStudio can save you from typing a lot of extra keystrokes.
NOTE: We’re using Command here for Macs, but if you’re using a Windows machine, substitute Control.
Command + Enter
Run a section of code in your R script.
Option + -
Input a <-
at your cursor to assign output to a variable.
Command + Shift + C
Highlight a section of code and use this command to append a #
to the beginning of each line, preventing it from executing.
A collection of frequently used terms in the R statistical programming language.
The sequence of characters <-
used to assign values to an object.
A line in your script beginning with #
that won’t be executed. Used to
Sometimes abbreviated “df,” a dataframe is R parlance for a dataset of vectors stored a list.
A type of variable in a dataframe that interprets character strings into ordered numerical categories.
Command your script to run a line of your code. Shortcut: CMD/CTRL + Enter
A set of objects that can contain things like variables or dataframes.
An enhancements to R that adds additional functionality to your workspace.
The sequence of characters %>%
used to chain together different functions for more complex operations. Shortcut: CMD/CTRL + Shift + M
A file with the suffix “.R” where you write your R code.
A sequence of characters not interpreted as a numeric variable.
Definition for your variable that describes its format. For example: numeric or character.
A variable.
The area in your computer’s memory where you’ll be working, and where are your data, functions, packages, etc. are loaded.