-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRmarkdown.txt
65 lines (48 loc) · 2.08 KB
/
Rmarkdown.txt
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
Rmarkdown Notes
#yaml header
example
---
title: "MB bulkRNA analysis"
author: "Merridee Wouters"
date: "`r format(Sys.time(), '%d %B, %Y')`"
bibliography: [reportBib/Packages.bib, reportBib/extraPackages.bib, reportBib/otherRefs.bib]
output:
bookdown::html_document2: default
bookdown::pdf_document2: default
keep_md: true
---
using Rbookdown which automatically labels sections, tables and figures.
yaml header also includes
datestamp
chosen default output as html which renders figures as pngs (ie as bitmaps)
if pdf is chosen as the output, figures are rendered as pdfs ie a vector format.
Probably worthwhile knitting as pdf at least once when parking the project so all figures rendered in vector format.
3 files for bibliography, two automatically generated by repmis. The other contains additional refs added manually, some of them as substitutes where repmis cited a package rather than the relevant paper.
keep_md: true
caches figures, may need to be accompanied by cache = TRUE in at least one chunk?
setup includes
setting up directory structure
setting up colour palette
tabsets
can be used in html documents to condense the main document
maybe for alternate analyses ie different modelling of the same contrast
or to add supplementary data
#including child documents
These are run in a clean environment and the results fed back into the main document,
so need to ensure you don't alter the state by introducing one of these (use unique variable names, etc)
Ideally would like to make my analyses more modular using these,
as it should be possible to reduce debugging time
For the moment, I've used them to bolt on analyses that were afterthoughts
```{r analyseGSEA, child = "modules/GSEAb.rmd", results='asis'}
```
## Procedure
Set up and run as standalone rmd document in a subfolder of code (eg modules)
test in shell
run in main document
#RMD comments
[]: #Need a blank line before a list.
Need a blank line after a section
Fussy about labels for figures
Doesn't like _ underscores
but you can use dashes
Doesn't like spaces, although these are fine in r chunk labels that are not figures