-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PHS HTML template * copy in CSS file with code * Update documentation * tidying --------- Co-authored-by: Alan Yeung <[email protected]> Co-authored-by: alan-y <[email protected]>
- Loading branch information
1 parent
d01fe75
commit da0311d
Showing
5 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: "My PHS HTML Document" | ||
author: "My Name" | ||
date: "`r format(Sys.Date(), '%d %B %Y')`" | ||
output: | ||
html_document: | ||
css: phs_style.css | ||
toc: true | ||
toc_float: true | ||
keep_md: true | ||
--- | ||
|
||
```{r setup, include=FALSE} | ||
knitr::opts_chunk$set(echo = TRUE) | ||
# Copy in the PHS style CSS file if required | ||
if (!file.exists(file.path(getwd(), "phs_style.css"))) { | ||
phstemplates::add_stylecss(getwd(), auto_open = FALSE) | ||
} | ||
``` | ||
|
||
# R Markdown | ||
|
||
This is an R Markdown document with basic PHS styles included for output to HTML. | ||
|
||
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: | ||
|
||
```{r cars} | ||
summary(cars) | ||
``` | ||
|
||
## Including Plots | ||
|
||
You can also embed plots, for example: | ||
|
||
```{r pressure, echo=FALSE} | ||
plot(pressure) | ||
``` | ||
|
||
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name: PHS HTML Document | ||
description: Template to produce a PHS document with basic PHS styles. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.