-
Notifications
You must be signed in to change notification settings - Fork 10
/
Output.Rmd
executable file
·60 lines (49 loc) · 1.44 KB
/
Output.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
---
title: "Generating output files"
author: "Leo Lahti, Sudarshan Shetty et al."
bibliography:
- bibliography.bib
output:
BiocStyle::html_document:
number_sections: no
toc: yes
toc_depth: 4
toc_float: true
self_contained: true
thumbnails: true
lightbox: true
gallery: true
use_bookdown: false
highlight: haddock
---
<!--
%\VignetteEngine{knitr::rmarkdown}
%\VignetteIndexEntry{microbiome tutorial - output}
%\usepackage[utf8]{inputenc}
%\VignetteEncoding{UTF-8}
-->
## Writing diversity table into file
```{r diversity-example4, warning=FALSE, eval = FALSE}
output.dir <- "./"
write.table(div.table, file = "DiversityTable.tab", sep = "\t")
```
## Save clustering image to a file
Save in PDF:
```{r clustering-saving, message=FALSE, warning=FALSE, eval=FALSE}
pdf("myplot.pdf", width = 7, height = 7 * length(hc$order)/20)
plot(hc, hang=-1, main = "Hierarchical clustering")
dev.off()
```
Save in TIFF:
```{r clustering-saving2, message=FALSE, warning=FALSE, eval=FALSE}
tiff("myplot.tif", width = 480, height = 480 * length(hc$order)/20)
plot(hc, hang=-1, main = "Hierarchical clustering")
dev.off()
```
To save in Microsoft EMF format, try the following. If you find a
way to tune figure width for emf files kindly let the admins know.
```{r clustering-saving3, message=FALSE, warning=FALSE, eval=FALSE}
plot(hc, hang=-1, main = "Hierarchical clustering")
savePlot("myplot.emf", type = "emf")
dev.off()
```