Tips and further reading

Dive deeper

Full R scripts

Get the full R scripts for this modules walkthroughs here:

  1. R and the Tidyverse
  2. Investigating disparities in R
  3. Data visualization in R

Handy keyboard shortcuts

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.

Execute a command

Command + Enter

Run a section of code in your R script.

Use an assignment

Option + -

Input a <- at your cursor to assign output to a variable.

Comment multiple lines

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.

Glossary

A collection of frequently used terms in the R statistical programming language.

assignment function

The sequence of characters <- used to assign values to an object.

comment

A line in your script beginning with # that won’t be executed. Used to

dataframe

Sometimes abbreviated “df,” a dataframe is R parlance for a dataset of vectors stored a list.

factor

A type of variable in a dataframe that interprets character strings into ordered numerical categories.

execute

Command your script to run a line of your code. Shortcut: CMD/CTRL + Enter

list

A set of objects that can contain things like variables or dataframes.

package

An enhancements to R that adds additional functionality to your workspace.

pipe

The sequence of characters %>% used to chain together different functions for more complex operations. Shortcut: CMD/CTRL + Shift + M

script

A file with the suffix “.R” where you write your R code.

string

A sequence of characters not interpreted as a numeric variable.

type

Definition for your variable that describes its format. For example: numeric or character.

vector

A variable.

workspace

The area in your computer’s memory where you’ll be working, and where are your data, functions, packages, etc. are loaded.


Previous submodule: