-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
72 lines (37 loc) · 1.98 KB
/
README.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
```{r info_on_this_file, eval=FALSE,echo=FALSE,message=FALSE}
##this file is used to update the README.md from the package vignette
##(credit for the idea and implementation in this packages goes to Thibuat Jombart)
##to update README.md, simply run:
##knitr::knit("README.Rmd")
```
```{r compileVignette, results="hide",echo=FALSE,message=FALSE}
##delete old figures
file.remove(dir("vignettes/figure",full.names = T))
## recompile vignette
setwd("vignettes")
knitr::knit("mtDNAcombine.Rmd")
setwd("../")
```
```{r include, results="asis", echo=FALSE, warning=FALSE}
## read md of the vignette
mdInput <- readLines("vignettes/mtDNAcombine.md")
## remove vignette-specific headers
toRemove <- 1:12
mdInput <- mdInput[-toRemove]
## add badges
circleci_img <- '[![CircleCI](https://img.shields.io/circleci/build/github/EvolEcolGroup/mtDNAcombine/master?label=build%20%28master%29&logo=circleci&style=plastic&token=dbf19e075582baa257024cdbe7a75edf96f93517)](https://circleci.com/gh/EvolEcolGroup/mtDNAcombine/tree/master)'
## Add badge for Circleci
mdInput[2] <- paste(circleci_img)
## restore right path for figures
## pick wd path depending on operating system
## LINUX
#foo <- '/home/eleanor/'
## Windows
foo <- 'C:/Users/mille/'
mdInput <- gsub(paste0(foo,"Documents/Projects/mtDNAcombine/inst/extdata/mtDNAcombine_flow.png"), "./inst/extdata/mtDNAcombine_flow.png", mdInput)
mdInput <- gsub(paste0(foo,"Documents/Projects/mtDNAcombine/inst/extdata/hist_Pinicola_enucleator.png"), "./inst/extdata/hist_Pinicola_enucleator.png", mdInput)
mdInput <- gsub(paste0(foo,"Documents/Projects/mtDNAcombine/inst/extdata/hist_Calidris_maritima.png"), "./inst/extdata/hist_Calidris_maritima.png", mdInput)
mdInput <- gsub(paste0(foo,"Documents/Projects/mtDNAcombine/inst/extdata/Net_Picoides_tridactylus.png"), "./inst/extdata/Net_Picoides_tridactylus.png", mdInput)
mdInput <- gsub("figure/plotting median-1.png", "./inst/extdata/common_rosefinch_BSP.png", mdInput)
cat(paste(mdInput,collapse="\n"))
```