-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathr-dataframes.html
More file actions
586 lines (540 loc) · 28.3 KB
/
r-dataframes.html
File metadata and controls
586 lines (540 loc) · 28.3 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<title>Data Frames</title>
<script src="libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="libs/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<script src="libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="libs/navigation-1.1/tabsets.js"></script>
<link href="libs/highlightjs-1.1/default.css" rel="stylesheet" />
<script src="libs/highlightjs-1.1/highlight.js"></script>
<!-- Favicon -->
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
<!-- Google analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-8298649-8', 'auto');
ga('send', 'pageview');
</script>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs && document.readyState && document.readyState === "complete") {
window.setTimeout(function() {
hljs.initHighlighting();
}, 0);
}
</script>
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<link rel="stylesheet" href="libs/local/main.css" type="text/css" />
<link rel="stylesheet" href="libs/local/nav.css" type="text/css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" type="text/css" />
</head>
<body>
<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
height: auto;
}
.tabbed-pane {
padding-top: 12px;
}
button.code-folding-btn:focus {
outline: none;
}
</style>
<div class="container-fluid main-container">
<!-- tabsets -->
<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});
</script>
<!-- code folding -->
<header>
<div class="nav">
<a class="nav-logo" href="index.html">
<!-- <img src="static/img/stat545-logo-s.png" width="70px" height="70px"/> -->
<img src="img/logo-100px.jpg" width="80px" height="80px"/>
</a>
<ul>
<li class="home"><a href="index.html">Home</a></li>
<li class="faq"><a href="faq.html">FAQ</a></li>
<li class="syllabus"><a href="syllabus.html">Syllabus</a></li>
<li class="topics"><a href="topics.html">Topics</a></li>
<li class="people"><a href="people.html">People</a></li>
</ul>
</div>
</header>
<div class="fluid-row" id="header">
<h1 class="title toc-ignore">Data Frames</h1>
</div>
<div id="TOC">
<ul>
<li><a href="#our-data">Our data</a></li>
<li><a href="#reading-in-data">Reading in data</a><ul>
<li><a href="#dplyr-and-readr">dplyr and readr</a></li>
<li><a href="#read_csv"><code>read_csv()</code></a></li>
</ul></li>
<li><a href="#inspecting-data.frame-objects">Inspecting data.frame objects</a></li>
<li><a href="#accessing-variables-subsetting-data-frames">Accessing variables & subsetting data frames</a></li>
<li><a href="#bonus-preview-to-advanced-manipulation">BONUS: Preview to advanced manipulation</a></li>
</ul>
</div>
<p>There are <em>lots</em> of different basic data structures in R. If you take any kind of longer introduction to R you’ll probably learn about arrays, lists, matrices, etc. Let’s skip straight to the data structure you’ll probably use most – the <strong>data frame</strong>. We use data frames to store heterogeneous tabular data in R: tabular, meaning that individuals or observations are typically represented in rows, while variables or features are represented as columns; heterogeneous, meaning that columns/features/variables can be different classes (on variable, e.g. age, can be numeric, while another, e.g., cause of death, can be text).</p>
<p>This lesson assumes a <a href="r-basics.html">basic familiarity with R</a>.</p>
<div id="our-data" class="section level2">
<h2>Our data</h2>
<!-- There are some built-in data frames that ship with R that you'll often see people referencing in help forums or other places to demonstrate some functionality. The `mtcars` data frame has data extracted from the 1974 _Motor Trend_ magazine giving statistics about design and performance for 32 different vehicles. You can just type `mtcars` to look at the whole dataset. -->
<p>The data we’re going to look at is cleaned up version of a gene expression dataset from <a href="http://www.ncbi.nlm.nih.gov/pubmed/17959824">Brauer et al. Coordination of Growth Rate, Cell Cycle, Stress Response, and Metabolic Activity in Yeast (2008) <em>Mol Biol Cell</em> 19:352-367</a>. This data is from a gene expression microarray, and in this paper the authors are examining the relationship between growth rate and gene expression in yeast cultures limited by one of six different nutrients (glucose, leucine, ammonium, sulfate, phosphate, uracil). If you give yeast a rich media loaded with nutrients except restrict the supply of a <em>single</em> nutrient, you can control the growth rate to any rate you choose. By starving yeast of specific nutrients you can find genes that:</p>
<ol style="list-style-type: decimal">
<li><strong>Raise or lower their expression in response to growth rate</strong>. Growth-rate dependent expression patterns can tell us a lot about cell cycle control, and how the cell responds to stress. The authors found that expression of >25% of all yeast genes is linearly correlated with growth rate, independent of the limiting nutrient. They also found that the subset of negatively growth-correlated genes is enriched for peroxisomal functions, and positively correlated genes mainly encode ribosomal functions.</li>
<li><strong>Respond differently when different nutrients are being limited</strong>. If you see particular genes that respond very differently when a nutrient is sharply restricted, these genes might be involved in the transport or metabolism of that specific nutrient.</li>
</ol>
<p>You can download the cleaned up version of the data at <a href="http://bioconnector.org/data">bioconnector.org/data</a>. The file is called <strong>brauer2007_tidy.csv</strong>. Later on we’ll actually start with the original raw data (minimally processed) and manipulate it so that we can make it more amenable for analysis.</p>
</div>
<div id="reading-in-data" class="section level2">
<h2>Reading in data</h2>
<div id="dplyr-and-readr" class="section level3">
<h3>dplyr and readr</h3>
<p>There are some built-in functions for reading in data in text files. These functions are <em>read-dot-something</em> – for example, <code>read.csv()</code> reads in comma-delimited text data; <code>read.delim()</code> reads in tab-delimited text, etc. We’re going to read in data a little bit differently here using the <a href="https://github.com/hadley/readr">readr</a> package. When you load the readr package, you’ll have access to very similar looking functions, named <em>read-underscore-something</em> – e.g., <code>read_csv()</code>. You have to have the readr package installed to access these functions. Compared to the base functions, they’re <em>much</em> faster, they’re good at guessing the types of data in the columns, they don’t do some of the other silly things that the base functions do. We’re going to use another package later on called <a href="https://cran.r-project.org/web/packages/dplyr/index.html">dplyr</a>, and if you have the dplyr package loaded as well, and you read in the data with readr, the data will display nicely.</p>
<p>First let’s load those packages.</p>
<pre class="r"><code>library(readr)
library(dplyr)</code></pre>
<p>If you see a warning that looks like this: <code>Error in library(packageName) : there is no package called 'packageName'</code>, then you don’t have the package installed correctly. See the <a href="setup-r.html">setup page</a>.</p>
</div>
<div id="read_csv" class="section level3">
<h3><code>read_csv()</code></h3>
<p>Now, let’s actually load the data. You can get help for the import function with <code>?read_csv</code>. When we load data we assign it to a variable just like any other, and we can choose a name for that data. Since we’re going to be referring to this data a lot, let’s give it a short easy name to type. I’m going to call it <code>ydat</code>. Once we’ve loaded it we can type the name of the object itself (<code>ydat</code>) to see it printed to the screen.</p>
<pre class="r"><code>ydat <- read_csv(file="data/brauer2007_tidy.csv")
ydat</code></pre>
<pre><code>## # A tibble: 198,430 × 7
## symbol systematic_name nutrient rate expression
## <chr> <chr> <chr> <dbl> <dbl>
## 1 SFB2 YNL049C Glucose 0.05 -0.24
## 2 <NA> YNL095C Glucose 0.05 0.28
## 3 QRI7 YDL104C Glucose 0.05 -0.02
## 4 CFT2 YLR115W Glucose 0.05 -0.33
## 5 SSO2 YMR183C Glucose 0.05 0.05
## 6 PSP2 YML017W Glucose 0.05 -0.69
## 7 RIB2 YOL066C Glucose 0.05 -0.55
## 8 VMA13 YPR036W Glucose 0.05 -0.75
## 9 EDC3 YEL015W Glucose 0.05 -0.24
## 10 VPS5 YOR069W Glucose 0.05 -0.16
## # ... with 198,420 more rows, and 2 more variables: bp <chr>, mf <chr></code></pre>
<p>Take a look at that output. The nice thing about loading dplyr and reading in data with readr is that data frames are displayed in a much more friendly way. This dataset has nearly 200,000 rows and 7 columns. When you import data this way and try to display the object in the console, instead of trying to display all 200,000 rows, you’ll only see about 10 by default. Also, if you have so many columns that the data would wrap off the edge of your screen, those columns will not be displayed, but you’ll see at the bottom of the output which, if any, columns were hidden from view. If you want to see the whole dataset, there are two ways to do this. First, you can click on the name of the data.frame in the <strong>Environment</strong> panel in RStudio. Or you could use the <code>View()</code> function (<em>with a capital V</em>).</p>
<pre class="r"><code>View(ydat)</code></pre>
</div>
</div>
<div id="inspecting-data.frame-objects" class="section level2">
<h2>Inspecting data.frame objects</h2>
<p>There are several built-in functions that are useful for working with data frames.</p>
<ul>
<li>Content:
<ul>
<li><code>head()</code>: shows the first few rows</li>
<li><code>tail()</code>: shows the last few rows</li>
</ul></li>
<li>Size:
<ul>
<li><code>dim()</code>: returns a 2-element vector with the number of rows in the first element, and the number of columns as the second element (the dimensions of the object)</li>
<li><code>nrow()</code>: returns the number of rows</li>
<li><code>ncol()</code>: returns the number of columns</li>
</ul></li>
<li>Summary:
<ul>
<li><code>colnames()</code> (or just <code>names()</code>): returns the column names</li>
<li><code>str()</code>: structure of the object and information about the class, length and content of each column</li>
<li><code>summary()</code>: works differently depending on what kind of object you pass to it. Passing a data frame to the <code>summary()</code> function prints out useful summary statistics about numeric column (min, max, median, mean, etc.)</li>
</ul></li>
</ul>
<pre class="r"><code>head(ydat)</code></pre>
<pre><code>## # A tibble: 6 × 7
## symbol systematic_name nutrient rate expression
## <chr> <chr> <chr> <dbl> <dbl>
## 1 SFB2 YNL049C Glucose 0.05 -0.24
## 2 <NA> YNL095C Glucose 0.05 0.28
## 3 QRI7 YDL104C Glucose 0.05 -0.02
## 4 CFT2 YLR115W Glucose 0.05 -0.33
## 5 SSO2 YMR183C Glucose 0.05 0.05
## 6 PSP2 YML017W Glucose 0.05 -0.69
## # ... with 2 more variables: bp <chr>, mf <chr></code></pre>
<pre class="r"><code>tail(ydat)</code></pre>
<pre><code>## # A tibble: 6 × 7
## symbol systematic_name nutrient rate expression
## <chr> <chr> <chr> <dbl> <dbl>
## 1 DOA1 YKL213C Uracil 0.3 0.14
## 2 KRE1 YNL322C Uracil 0.3 0.28
## 3 MTL1 YGR023W Uracil 0.3 0.27
## 4 KRE9 YJL174W Uracil 0.3 0.43
## 5 UTH1 YKR042W Uracil 0.3 0.19
## 6 <NA> YOL111C Uracil 0.3 0.04
## # ... with 2 more variables: bp <chr>, mf <chr></code></pre>
<pre class="r"><code>dim(ydat)</code></pre>
<pre><code>## [1] 198430 7</code></pre>
<pre class="r"><code>names(ydat)</code></pre>
<pre><code>## [1] "symbol" "systematic_name" "nutrient" "rate"
## [5] "expression" "bp" "mf"</code></pre>
<pre class="r"><code>str(ydat)</code></pre>
<pre><code>## Classes 'tbl_df', 'tbl' and 'data.frame': 198430 obs. of 7 variables:
## $ symbol : chr "SFB2" NA "QRI7" "CFT2" ...
## $ systematic_name: chr "YNL049C" "YNL095C" "YDL104C" "YLR115W" ...
## $ nutrient : chr "Glucose" "Glucose" "Glucose" "Glucose" ...
## $ rate : num 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 ...
## $ expression : num -0.24 0.28 -0.02 -0.33 0.05 -0.69 -0.55 -0.75 -0.24 -0.16 ...
## $ bp : chr "ER to Golgi transport" "biological process unknown" "proteolysis and peptidolysis" "mRNA polyadenylylation*" ...
## $ mf : chr "molecular function unknown" "molecular function unknown" "metalloendopeptidase activity" "RNA binding" ...
## - attr(*, "spec")=List of 2
## ..$ cols :List of 7
## .. ..$ symbol : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ systematic_name: list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ nutrient : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ rate : list()
## .. .. ..- attr(*, "class")= chr "collector_double" "collector"
## .. ..$ expression : list()
## .. .. ..- attr(*, "class")= chr "collector_double" "collector"
## .. ..$ bp : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## .. ..$ mf : list()
## .. .. ..- attr(*, "class")= chr "collector_character" "collector"
## ..$ default: list()
## .. ..- attr(*, "class")= chr "collector_guess" "collector"
## ..- attr(*, "class")= chr "col_spec"</code></pre>
<pre class="r"><code>summary(ydat)</code></pre>
<pre><code>## symbol systematic_name nutrient rate
## Length:198430 Length:198430 Length:198430 Min. :0.0500
## Class :character Class :character Class :character 1st Qu.:0.1000
## Mode :character Mode :character Mode :character Median :0.2000
## Mean :0.1752
## 3rd Qu.:0.2500
## Max. :0.3000
## expression bp mf
## Min. :-6.500000 Length:198430 Length:198430
## 1st Qu.:-0.290000 Class :character Class :character
## Median : 0.000000 Mode :character Mode :character
## Mean : 0.003367
## 3rd Qu.: 0.290000
## Max. : 6.640000</code></pre>
</div>
<div id="accessing-variables-subsetting-data-frames" class="section level2">
<h2>Accessing variables & subsetting data frames</h2>
<p>We can access individual variables within a data frame using the <code>$</code> operator, e.g., <code>mydataframe$specificVariable</code>. Let’s print out all the gene names in the data. Then let’s calculate the average expression across all conditions, all genes (using the built-in <code>mean()</code> function).</p>
<pre class="r"><code># display all gene symbols
ydat$symbol</code></pre>
<pre><code>## [1] "SFB2" NA "QRI7" "CFT2" "SSO2" "PSP2"
## [7] "RIB2" "VMA13" "EDC3" "VPS5" NA "AMN1"
## [13] "SCW11" "DSE2" "COX15" "SPE1" "MTF1" "KSS1"
## [19] NA NA "YAP7" NA "YVC1" "CDC40"
## [25] NA "RMD1" "PCL6" "AI4" "GGC1" "SUL1"
## [31] "RAD57" NA "PER1" "YHC3" "SGE1" "HNM1"
## [37] "SWI1" "NAM8" NA "BGL2" "ACT1" NA
## [43] "SFL1" "OYE3" "MMP1" "MHT1" "SUL2" "IPP1"
## [49] "CWP1" "SNF11" "PEX25" "ELO1" NA "CDC13"
## [55] "FKH1" "SWD1" NA "HOF1" "HOC1" "BNI5"
## [61] "CSN12" "PGS1" "MLP2" "HRP1" NA "SEC39"
## [67] "ECM31" NA NA "ADE4" "ABC1" "DLD2"
## [73] "PHA2" NA "HAP3" "MRPL23" NA NA
## [79] "MRPL16" NA NA NA NA "AI3"
## [85] "COX1" NA "VAR1" "COX3" "COX2" "AI5_BETA"
## [91] "AI2" NA NA "GPI18" "COS9" NA
## [97] NA "PRP46" "XDJ1" "SLG1" "MAM3" "AEP1"
## [103] "UGO1" NA "RSC2" "YAP1801" "ZPR1" "BCD1"
## [109] "UBP10" "SLD3" "RLF2" "LRO1" NA "ITR2"
## [115] "ABP140" "STT3" "PTC2" "STE20" "HRD3" "CWH43"
## [121] "ASK10" "MPE1" "SWC3" "TSA1" "ADE17" "GFD2"
## [127] "PXR1" NA "BUD14" "AUS1" "NHX1" "NTE1"
## [133] NA "KIN3" "BUD4" "SLI15" "PMT4" "AVT5"
## [139] "CHS2" "GPI13" "KAP95" "EFT2" "EFT1" "GAS1"
## [145] "CYK3" "COQ2" "PSD1" NA "PAC1" "SUR7"
## [151] "RAX1" "DFM1" "RBD2" NA "YIP4" "SRB2"
## [157] "HOL1" "MEP3" NA "FEN2" NA "RFT1"
## [163] NA "MCK1" "GPI10" "APT1" NA NA
## [169] "CPT1" "ERV29" "SFK1" NA "SEC20" "TIR4"
## [175] NA NA "ARC35" "SOL1" "BIO2" "ASC1"
## [181] "RBG1" "PTC4" NA "OXA1" "SIT4" "PUB1"
## [187] "FPR4" "FUN12" "DPH2" "DPS1" "DLD1" "ASN2"
## [193] "TRM9" "DED81" "SRM1" "SAM50" "POP2" "FAA4"
## [199] NA "CEM1"
## [ reached getOption("max.print") -- omitted 198230 entries ]</code></pre>
<pre class="r"><code>#mean expression
mean(ydat$expression)</code></pre>
<pre><code>## [1] 0.003367182</code></pre>
<p>Now that’s not too interesting. This is the average gene expression across all genes, across all conditions. The data is actually scaled/centered around zero:</p>
<p><img src="r-dataframes_files/figure-html/histogram_expression_values-1.png" /><!-- --></p>
<p>We might be interested in the average expression of genes with a particular biological function, and how that changes over different growth rates restricted by particular nutrients. This is the kind of thing we’re going to do in the next section.</p>
<hr />
<p><strong>EXERCISE 1</strong></p>
<ol style="list-style-type: decimal">
<li>What’s the standard deviation expression (hint: get help on the <code>sd</code> function with <code>?sd</code>).</li>
<li>What’s the range of rate represented in the data? (hint: <code>range()</code>).</li>
</ol>
<hr />
</div>
<div id="bonus-preview-to-advanced-manipulation" class="section level2">
<h2>BONUS: Preview to advanced manipulation</h2>
<p>What if we wanted show the mean expression, standard deviation, and correlation between growth rate and expression, separately for each limiting nutrient, separately for each gene, for all genes involved in the leucine biosynthesis pathway?</p>
<pre class="r"><code>ydat %>%
filter(bp=="leucine biosynthesis") %>%
group_by(nutrient, symbol) %>%
summarize(mean=mean(expression), sd=sd(expression), r=cor(rate, expression))</code></pre>
<table>
<thead>
<tr class="header">
<th align="left">nutrient</th>
<th align="left">symbol</th>
<th align="right">mean</th>
<th align="right">sd</th>
<th align="right">r</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">Ammonia</td>
<td align="left">LEU1</td>
<td align="right">-0.82</td>
<td align="right">0.39</td>
<td align="right">0.66</td>
</tr>
<tr class="even">
<td align="left">Ammonia</td>
<td align="left">LEU2</td>
<td align="right">-0.54</td>
<td align="right">0.38</td>
<td align="right">-0.19</td>
</tr>
<tr class="odd">
<td align="left">Ammonia</td>
<td align="left">LEU4</td>
<td align="right">-0.37</td>
<td align="right">0.56</td>
<td align="right">-0.67</td>
</tr>
<tr class="even">
<td align="left">Ammonia</td>
<td align="left">LEU9</td>
<td align="right">-1.01</td>
<td align="right">0.64</td>
<td align="right">0.87</td>
</tr>
<tr class="odd">
<td align="left">Glucose</td>
<td align="left">LEU1</td>
<td align="right">-0.55</td>
<td align="right">0.41</td>
<td align="right">0.98</td>
</tr>
<tr class="even">
<td align="left">Glucose</td>
<td align="left">LEU2</td>
<td align="right">-0.39</td>
<td align="right">0.33</td>
<td align="right">0.90</td>
</tr>
<tr class="odd">
<td align="left">Glucose</td>
<td align="left">LEU4</td>
<td align="right">1.09</td>
<td align="right">1.01</td>
<td align="right">-0.97</td>
</tr>
<tr class="even">
<td align="left">Glucose</td>
<td align="left">LEU9</td>
<td align="right">-0.16</td>
<td align="right">0.35</td>
<td align="right">0.35</td>
</tr>
<tr class="odd">
<td align="left">Leucine</td>
<td align="left">LEU1</td>
<td align="right">2.70</td>
<td align="right">1.08</td>
<td align="right">-0.95</td>
</tr>
<tr class="even">
<td align="left">Leucine</td>
<td align="left">LEU2</td>
<td align="right">0.28</td>
<td align="right">1.16</td>
<td align="right">-0.97</td>
</tr>
<tr class="odd">
<td align="left">Leucine</td>
<td align="left">LEU4</td>
<td align="right">0.80</td>
<td align="right">1.06</td>
<td align="right">-0.97</td>
</tr>
<tr class="even">
<td align="left">Leucine</td>
<td align="left">LEU9</td>
<td align="right">0.39</td>
<td align="right">0.18</td>
<td align="right">-0.77</td>
</tr>
<tr class="odd">
<td align="left">Phosphate</td>
<td align="left">LEU1</td>
<td align="right">-0.43</td>
<td align="right">0.27</td>
<td align="right">0.95</td>
</tr>
<tr class="even">
<td align="left">Phosphate</td>
<td align="left">LEU2</td>
<td align="right">-0.26</td>
<td align="right">0.19</td>
<td align="right">0.70</td>
</tr>
<tr class="odd">
<td align="left">Phosphate</td>
<td align="left">LEU4</td>
<td align="right">-0.99</td>
<td align="right">0.11</td>
<td align="right">0.24</td>
</tr>
<tr class="even">
<td align="left">Phosphate</td>
<td align="left">LEU9</td>
<td align="right">-1.12</td>
<td align="right">0.53</td>
<td align="right">0.90</td>
</tr>
<tr class="odd">
<td align="left">Sulfate</td>
<td align="left">LEU1</td>
<td align="right">-1.17</td>
<td align="right">0.34</td>
<td align="right">0.98</td>
</tr>
<tr class="even">
<td align="left">Sulfate</td>
<td align="left">LEU2</td>
<td align="right">-0.96</td>
<td align="right">0.30</td>
<td align="right">0.57</td>
</tr>
<tr class="odd">
<td align="left">Sulfate</td>
<td align="left">LEU4</td>
<td align="right">-0.24</td>
<td align="right">0.43</td>
<td align="right">-0.60</td>
</tr>
<tr class="even">
<td align="left">Sulfate</td>
<td align="left">LEU9</td>
<td align="right">-1.24</td>
<td align="right">0.55</td>
<td align="right">0.99</td>
</tr>
<tr class="odd">
<td align="left">Uracil</td>
<td align="left">LEU1</td>
<td align="right">-0.74</td>
<td align="right">0.73</td>
<td align="right">0.89</td>
</tr>
<tr class="even">
<td align="left">Uracil</td>
<td align="left">LEU2</td>
<td align="right">0.18</td>
<td align="right">0.13</td>
<td align="right">-0.07</td>
</tr>
<tr class="odd">
<td align="left">Uracil</td>
<td align="left">LEU4</td>
<td align="right">-0.65</td>
<td align="right">0.44</td>
<td align="right">0.77</td>
</tr>
<tr class="even">
<td align="left">Uracil</td>
<td align="left">LEU9</td>
<td align="right">-1.02</td>
<td align="right">0.91</td>
<td align="right">0.94</td>
</tr>
</tbody>
</table>
<p>Neat eh? Let’s learn how to do that in the <a href="r-dplyr.html">advanced manipulation with dplyr lesson</a>.</p>
</div>
<div class="footer">
This work is licensed under the <a href="http://creativecommons.org/licenses/by-nc/3.0/">CC BY-NC 3.0 Creative Commons License</a>.<br>
For more information, visit <a href="https://www.bioconnector.virginia.edu/">bioconnector.virginia.edu</a>.<br>
<a href="https://twitter.com/genetics_blog" target="_blank"><i class="fa fa-twitter fa-lg"></i></a>
<a href="https://github.com/stephenturner/" target="_blank"><i class="fa fa-github fa-lg"></i></a>
<a href="http://www.gettinggeneticsdone.com/" target="_blank"><i class="fa fa-rss fa-lg"></i></a>
</div>
</div>
<script>
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>