forked from cambiotraining/r-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexercise10.Rmd
38 lines (28 loc) · 877 Bytes
/
exercise10.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
---
title: "Exercise 10"
author: "Your Name"
date: '`r format(Sys.time(), "%d %b %Y")`'
output: html_document
---
- Modifiy the code chunk so this is run once only
```{r}
genes <- read.delim("gene.description.txt")
subjects <- read.delim("cancer.patients.txt")
evals <- read.delim("gene.expression.txt",stringsAsFactors = FALSE)
```
The number of genes in the study is ..... and there were ..... subjects
```{r results='hide'}
##HIDE ME!!!
genelist <- c("ESR1", "NAT1", "SUSD3","SLC7A2" ,"SCUBE2")
probes <- na.omit(genes[match(genelist,genes[,2]),1])
exprows <- match(probes,rownames(evals))
library(RColorBrewer)
sampcol <- rep("blue", ncol(evals))
sampcol[subjects$er == 1 ] <- "yellow"
rbPal <- brewer.pal(10, "RdBu")
heatmap(as.matrix(evals[exprows,]),ColSideColors = sampcol,col=rbPal)
```
- Create a list of R packages and versions
```{r}
##YOUR CODE HERE
```