diff --git a/cheatsheet.Rmd b/cheatsheet.Rmd index dd5b644..99d59c0 100644 --- a/cheatsheet.Rmd +++ b/cheatsheet.Rmd @@ -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 @@ -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) @@ -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. @@ -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** @@ -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** @@ -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** @@ -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 \ diff --git a/cheatsheet.nb.html b/cheatsheet.nb.html index 07f2bf4..9519593 100644 --- a/cheatsheet.nb.html +++ b/cheatsheet.nb.html @@ -11,7 +11,7 @@ - + Introduction to R for Biologists cheatsheet @@ -273,7 +273,7 @@

Introduction to R for Biologists cheatsheet

glossary of vocabulary used in the course

Maria Doyle

-

02 October 2019

+

03 October 2019

@@ -282,7 +282,7 @@

02 October 2019

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

readr
@@ -311,9 +311,12 @@

Functions

convert values to factor data type (from base R)

filter()
choose rows (from dplyr)

-

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

+

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)

head()
@@ -336,6 +339,8 @@

Functions

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.

summary()
@@ -348,7 +353,8 @@

Functions

Terms

-

argument an input to a function

+

argument
+an input to a function

assignment operator
<- assigns values to objects, assigns a value on the right to an object on the left (from base R)

character
@@ -357,14 +363,16 @@

Terms

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 a data type in R, used to represent categories

+

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

function
a pre-defined set of commands used to perform a task, can be loaded in from packages or user-created

geom
type of ggplot e.g. geom_line(), geom_point(), geom_jitter(), geom_boxplot(), geom_violin()

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 a package is a collection of functions and usually includes code, documentation, tests and example datasets.

+

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

pipe
%>% operator chains together tidyverse commands (from dplyr)

scales
@@ -373,7 +381,8 @@

Terms

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 the location (path) where R looks to read in data and save files

+

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

 

@@ -404,7 +413,7 @@

Symbols

-
LS0tCnRpdGxlOiAiSW50cm9kdWN0aW9uIHRvIFIgZm9yIEJpb2xvZ2lzdHMgY2hlYXRzaGVldCIKYXV0aG9yOiAiTWFyaWEgRG95bGUiCmRhdGU6ICJgciBmb3JtYXQoU3lzLnRpbWUoKSwgJyVkICVCICVZJylgIgpvdXRwdXQ6IAogIGh0bWxfbm90ZWJvb2s6CiAgICB0b2M6IHllcwogICAgdG9jX2Zsb2F0OiB5ZXMKICAgIHRvY19kZXB0aDogNApzdWJ0aXRsZTogZ2xvc3Nhcnkgb2Ygdm9jYWJ1bGFyeSB1c2VkIGluIHRoZSBjb3Vyc2UKLS0tCgojIyBQYWNrYWdlcwoKKipkcGx5cioqICAKdGlkeXZlcnNlIHBhY2thZ2UgZm9yIG1hbmlwdWxhdGluZyBkYXRhLCBjb250YWlucyB0aGUgYG11dGF0ZSgpYCBhbmQgYGZpbHRlcigpYCBmdW5jdGlvbnMgYW5kIHRoZSBgJT4lYCBvcGVyYXRvcgoKKipnZ3Bsb3QyKiogIAp0aWR5dmVyc2UgcGFja2FnZSBmb3IgZGF0YSB2aXN1YWxpc2F0aW9uIAoKKipyZWFkcioqICAKdGlkeXZlcnNlIHBhY2thZ2UgZm9yIHJlYWRpbmcgZGF0YSBpbnRvIFIsIGNvbnRhaW5zIHRoZSBgcmVhZF90c3YoKWAgZnVuY3Rpb24KCioqdGlkeXIqKiAgCnRpZHl2ZXJzZSBwYWNrYWdlIGZvciBkYXRhIHRpZHlpbmcsIGNvbnRhaW5zIHRoZSBgZ2F0aGVyKClgIGZ1bmN0aW9uCgoqKnRpZHl2ZXJzZSoqICAKYSBjb2xsZWN0aW9uIG9mIHBhY2thZ2VzIHRoYXQgd29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