Skip to content

Commit

Permalink
Update cheatsheet
Browse files Browse the repository at this point in the history
  • Loading branch information
mblue9 committed Oct 3, 2019
1 parent 28c6666 commit bf4414a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 17 deletions.
22 changes: 14 additions & 8 deletions cheatsheet.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
title: "Introduction to R for Biologists cheatsheet"
author: "Maria Doyle"
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
output:
html_notebook:
toc: yes
toc_float: yes
toc_depth: 4
toc_float: yes
subtitle: glossary of vocabulary used in the course
---

## Packages

**dplyr**
tidyverse package for manipulating data, contains the `mutate()` and `filter()` functions and the `%>%` operator
tidyverse package for manipulating data, contains the `mutate()`, `filter()`, `select()`, `full_join()` functions and the `%>%` operator

**ggplot2**
tidyverse package for data visualisation
Expand Down Expand Up @@ -57,12 +57,15 @@ convert values to factor data type (from base R)
**`filter()`**
choose rows (from dplyr)

**`full_join()`**
**`full_join()`**
joins 2 tables returning all rows and all columns from both tables.

**`gather()`**
function that enables converting from wide to long (tidy) format (from dplyr)

**`getwd()`**
find out what the working directory is (get working directory)

**`ggplot()`**
function used to create a ggplot (from ggplot2)

Expand Down Expand Up @@ -96,6 +99,9 @@ read a comma-separated file into R (from readr)
**`read_tsv()`**
read a tab-separated file into R (from readr)

**`select()`**
choose columns (from dplyr)

**`str()`**
showing the structure of an object (from base R). Useful for checking data types.

Expand All @@ -113,7 +119,7 @@ invoke a spreadsheet-like viewer on an R object (from base R)

## Terms

**argument**
**argument**
an input to a function

**assignment operator**
Expand All @@ -128,7 +134,7 @@ a window where you can interactively type in commands and the output is returned
**double**
a data type in R, used to represent numbers containing a decimal point (integer is the data type for numbers without decimal point)

**factor**
**factor**
a data type in R, used to represent categories

**function**
Expand All @@ -140,7 +146,7 @@ type of ggplot e.g. `geom_line()`, `geom_point()`, `geom_jitter()`, `geom_boxplo
**object**
everything in R is an object. The assignment operator `<-` can be used to create objects. Note that what R calls objects are called variables in other languages such as Python.

**package**
**package**
a package is a collection of functions and usually includes code, documentation, tests and example datasets.

**pipe**
Expand All @@ -155,7 +161,7 @@ a text file containing commands, in R a script filename ends with .R
**themes**
the non-data components of a ggplot e.g. background, grid lines, font size and font type

**working directory**
**working directory**
the location (path) where R looks to read in data and save files

\
Expand Down
Loading

0 comments on commit bf4414a

Please sign in to comment.