-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.Rmd
81 lines (53 loc) · 2.94 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
title: "Linear models in R"
output:
html_document:
theme: cerulean
css: style.css
---
## Workshop notes
* [Slideshow](slides/linear_thinking.html)
* [Linear models in R](topics/linear_models.html)
## Setup
This workshop is designed to work with [RStudio Cloud](https://rstudio.cloud/). Go to https://rstudio.cloud/ (Monash users can log in with their Monash google account) and create a new project. The workshop can also be done using R locally on your laptop (if doing this, we also recommend you create a new project to contain the files).
Running the R code below will download files and install packages used in this workshop.
```{r eval=FALSE}
# Download data
download.file(
"https://monashbioinformaticsplatform.github.io/r-linear/r-linear-files.zip",
destfile="r-linear-files.zip")
unzip("r-linear-files.zip")
# Install some CRAN packages:
install.packages(c("tidyverse", "multcomp", "BiocManager"))
# Install some Bioconductor packages:
BiocManager::install(c("limma","edgeR"))
```
Now load the file `linear_models.R` in the `r-linear-files` folder.
## Files
* [r-linear-files.zip](r-linear-files.zip) - Files used in this workshop.
## Key functions to remember
Built-in to R:
lm, anova, model.matrix, coef, sigma, df.residual, predict, confint, summary
I, poly
`splines` -- curve fitting:
ns, bs
`multcomp` -- linear hypothesis tests and multiple comparisons:
glht, confint, summary
`limma` and `edgeR` -- fitting many models to gene expression data:
DGEList, calcNormFactors, cpm,
lmFit, contrasts.fit, eBayes, plotSA, topTable
## Links
* [Monash Data Fluency](https://www.monash.edu/data-fluency)
* [More workshop materials from Monash Data Fluency](https://monashdatafluency.github.io/resources/)
* [Monash Bioinformatics Platform](https://www.monash.edu/researchinfrastructure/bioinformatics)
* [Course notes for PH525x](http://genomicsclass.github.io/book/) (initial chapters of this edX course cover similar material to this workshop)
* [James, Witten, Hastie and Tibshirani (2013) "An Introduction to Statistical Learning"](https://www-bcf.usc.edu/~gareth/ISL/)
* [Dance of the CIs](http://logarithmic.net/2017/dance/)
## Author
This course has been developed for the [Monash Bioinformatics Platform](https://www.monash.edu/researchinfrastructure/bioinformatics) and [Monash Data Fluency](https://www.monash.edu/data-fluency) by Paul Harrison.
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="figures/CC-BY.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
## Source code
* [GitHub repository](https://github.com/MonashBioinformaticsPlatform/r-linear)
<p style="margin-top: 5em; text-align: right">
<a href="http://bioinformatics.erc.monash.edu"><img src="figures/MBP-banner.png" width="675"></a>
</p>