Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file added R/.DS_Store
Binary file not shown.
83 changes: 83 additions & 0 deletions R/epurate.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,86 @@ QIMR <- function(toc = TRUE, code_folding = "hide", number_sections=TRUE) {
code_folding = code_folding,
)
}

# Features of ARAMIS Template
ARAMIS <- function(toc = TRUE, code_folding = "hide", number_sections=TRUE) {

# get the locations of resource files located within the package
css <- system.file("rmarkdown", "templates", "ARAMIS" ,"resources", "style.css", package = "epuRate")
template <- system.file("rmarkdown", "templates", "ARAMIS" ,"resources", "template_aramis.html", package = "epuRate")

# call the base html_document function
rmarkdown::html_document( theme= "lumen",
template= template,
css= css,
toc= toc,
toc_float = TRUE,
toc_depth = 2,
number_sections= number_sections,
df_print = "paged",
code_folding = code_folding,
)
}


# Features of ARAMIS+PCTG Template
ARAMISPCTG <- function(toc = TRUE, code_folding = "hide", number_sections=TRUE) {

# get the locations of resource files located within the package
css <- system.file("rmarkdown", "templates", "ARAMISPCTG" ,"resources", "style.css", package = "epuRate")
template <- system.file("rmarkdown", "templates", "ARAMISPCTG" ,"resources", "template_aramispctg.html", package = "epuRate")

# call the base html_document function
rmarkdown::html_document( theme= "lumen",
template= template,
css= css,
toc= toc,
toc_float = TRUE,
toc_depth = 2,
number_sections= number_sections,
df_print = "paged",
code_folding = code_folding,
)
}


# Features of KCL Template
KCL <- function(toc = TRUE, code_folding = "hide", number_sections=TRUE) {

# get the locations of resource files located within the package
css <- system.file("rmarkdown", "templates", "KCL" ,"resources", "style.css", package = "epuRate")
template <- system.file("rmarkdown", "templates", "KCL" ,"resources", "template_kcl.html", package = "epuRate")

# call the base html_document function
rmarkdown::html_document( theme= "lumen",
template= template,
css= css,
toc= toc,
toc_float = TRUE,
toc_depth = 2,
number_sections= number_sections,
df_print = "paged",
code_folding = code_folding,
)
}


# Features of International Statistical Genetics Workshop (Boulder workshop) Template
ISGW <- function(toc = TRUE, code_folding = "hide", number_sections=TRUE) {

# get the locations of resource files located within the package
css <- system.file("rmarkdown", "templates", "ISGW" ,"resources", "style.css", package = "epuRate")
template <- system.file("rmarkdown", "templates", "ISGW" ,"resources", "template_ISGW.html", package = "epuRate")

# call the base html_document function
rmarkdown::html_document( theme= "lumen",
template= template,
css= css,
toc= toc,
toc_float = TRUE,
toc_depth = 2,
number_sections= number_sections,
df_print = "paged",
code_folding = code_folding,
)
}
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Note that a specific version is available for:
- members of the [University of Queensland](https://holtzy.github.io/epuRate/uq.html)
- members of [PCTG](https://holtzy.github.io/epuRate/pctg.html)
- members of [QIMR](https://holtzy.github.io/epuRate/qimr.html)
- members of [ARAMIS]
- members of [KCL (King's College London)]
- members of [ISGW (International Statistical Genetics Workshop)]


<br><br><br>
Expand All @@ -28,17 +31,37 @@ Using it
- Install the R package:
```
library(devtools)
install_github("holtzy/epuRate")
install_github("holtzy/epuRate") # For standard, UQ, PCTG and QIMR templates
install_github("baptisteCD/epuRate") # For all of the above as well as ARAMIS lab, KCL (King's College London), ISGW (International Statistical Genetics Workshop)
library(epuRate)
```
- Open a new rmd file in Rstudio: File -> New File -> R Markdown -> From Template -> epuRate.

- Change the Header of your document with your name, email adress, github / twitter / linkedIn details if you want to display them. You can also add a logo over the table of content.


<br><br><br>
Personalised version
--------
- Fork the repo and pull on your local computer
- Duplicate one of the template folders (**/epuRate/inst/rmarkdown/templates/**)
- Rename the template folder: **MYNEWTEMPLATE**
- Modify the template name in the file **template.yaml**
- Replace the logo file (jpg, png) in **/epuRate/inst/rmarkdown/templates/MYNEWTEMPLATE/resources/**
- Add path to this logo file at line 382 of the **template_MYNEWTEMPLATE.html** file
- The path should correspond to your github link to the logo so typically: **https://github.com/MYGITHUBUSERNAME/epuRate/raw/master/inst/rmarkdown/templates/MYNEWTEMPLATE/resources/MYNEWTEMPLATE.png**
- Choose the personalised color that suits your logo and add the HEX code to the **style.css** file
- I tend to use a color from the logo, which I obtain using free online tool(s)
- You can choose a palette of colours or a single colour for the titles, links, TOCs and buttons
- In the **epuRate/R/epurate.R** add an instance for your new template and select the default options of the RMarkdown
- Commit and push the changes into your forked version in Github
- You should now be able to use your template by running **install_github("MYGITHUBUSERNAME/epuRate")**



--> Alternatively email me or send me a message on github with your **logo file**, the **HEX color code**
and the **Name of your wished template**, and I will see what I can do.

<br><br><br>
Acknowledgment
--------
Thanks to [Florian Rohart](http://florian.rohart.free.fr/Professional_page/Home.html) for his help on the PCTG template. Thanks to [Rstudio](https://www.rstudio.com) and its team for developing so many awesome tools.
Thanks to [Florian Rohart](http://florian.rohart.free.fr/Professional_page/Home.html) for his help on the PCTG template and [Baptiste Couvy-Duchesne](https://github.com/baptisteCD) for extending the template to ARAMIS, KCL and ISGW. Thanks to [Rstudio](https://www.rstudio.com) and its team for developing so many awesome tools.
439 changes: 439 additions & 0 deletions aramis.html

Large diffs are not rendered by default.

439 changes: 439 additions & 0 deletions aramispctg.html

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions build.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
# Remove previous version just in Case
remove.packages("epuRate")

# Install with devtools
# Install with devtools (LOCAL)
#library(devtools)
#devtools::install("../epuRate")

# Install from github
library(devtools)
devtools::install("../epuRate")
devtools::install_github("baptisteCD/epuRate")


# Load to check it is all good
library(epuRate)
5 changes: 5 additions & 0 deletions epuRate.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ SaveWorkspace: No
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 4
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

AutoAppendNewline: Yes
StripTrailingWhitespace: Yes

Expand Down
Binary file added inst/.DS_Store
Binary file not shown.
Binary file added inst/rmarkdown/.DS_Store
Binary file not shown.
Binary file added inst/rmarkdown/templates/.DS_Store
Binary file not shown.
Binary file added inst/rmarkdown/templates/ARAMIS/.DS_Store
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
87 changes: 87 additions & 0 deletions inst/rmarkdown/templates/ARAMIS/resources/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
h1, .h1, h2, .h2, h3, .h3 {
margin-top: 84px;
color: #6A0888
}

h1 {
padding-top: 100px;
}

h1.title {
text-align: center;
}

pre {
border: 0px solid #cccccc;
border-radius: 0px;
}







/* ---------- Links ----------------- */
a {
color: #6A0888;
}
a:hover {
color: #6A0888;
}




/* ---------- TOC ----------------- */
#TOC {
top: 30%;
position: fixed;
width: 210px;
}
.tocify {
border: none;
color: grey;
border-radius: 0px;
}
.list-group-item.active {
color: #6A0888;
background-color: white;
border-left: solid;
border-color: #6A0888;
}
.list-group-item:hover {
color: #6A0888;
background-color: white;
border-left: solid;
border-color: #6A0888;
}
.tocify-extend-page {
display: none;
}


/* ------ This is just to fix the bug on Safari where table of content is on top of content */
.toc-content {
margin-left: 230px
}




/* ---------- Button ----------------- */
.btn {
border-width: 0 0px 0px 0px;
font-weight: normal;
text-transform: ;
color: #6A0888;
}
.btn-default {
color: #6A0888;
background-color: #ffffff;
border-color: #ffffff;
}

.nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {
background-color: #6A0888;
}
Loading