Skip to content

Commit 2e570f7

Browse files
LeyshonLeyshon
authored andcommitted
feat: Adding access_head testfile
1 parent 7ed37de commit 2e570f7

File tree

3 files changed

+605
-0
lines changed

3 files changed

+605
-0
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
output:
3+
html_document:
4+
highlight: null
5+
theme: default
6+
---
7+
<html lang="en">
8+
<header>
9+
<meta charset="utf-8"/>
10+
<title>Testing 'access_head()'</title>
11+
<h1 class="title toc-ignore">Testing 'access_head()'</h1>
12+
<h2 class="author toc-ignore">Richard Leyshon</h2>
13+
<h2 class="date toc-ignore">03/12/2021</h2>
14+
</header>
15+
<body>
16+
```{r setup, include=FALSE}
17+
knitr::opts_chunk$set(echo = TRUE)
18+
library(accessrmd)
19+
library(ggplot2)
20+
```
21+
22+
## R Markdown
23+
24+
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see [RStudio's Rmarkdown guidance](http://rmarkdown.rstudio.com).
25+
26+
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:
27+
28+
```{r cars}
29+
summary(cars)
30+
```
31+
32+
## Including Plots
33+
34+
You can also embed plots, for example:
35+
36+
```{r pressure, echo=FALSE}
37+
plt <- ggplot(pressure, aes(x = temperature, y = pressure)) + geom_point()
38+
access_img(plt, alt = "Vapour pressure of mercury as a product of temperature",
39+
wid = 500)
40+
41+
```
42+
43+
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
44+
45+
## A tabset to test {.tabset}
46+
47+
48+
### Section 1
49+
50+
Sample text. Testing **bold**.
51+
52+
### Section 2
53+
54+
More Sample text
55+
56+
```{r}
57+
x <- as.data.frame(rnorm(300))
58+
plt <- ggplot(x, aes(x[, 1])) + geom_density()
59+
access_img(
60+
plt,
61+
alt = "Density plot of a sample taken from a normal distribution",
62+
ht = 500)
63+
```
64+
65+
66+
### Section 3
67+
68+
Yet more sample text
69+
70+
```{r}
71+
# some code comments to check
72+
vec <- c(runif(100))
73+
# Some output to check
74+
summary(vec)
75+
76+
```
77+
78+
79+
## The next header cancels the tabset
80+
81+
There doesn't appear to be an accordion feature native to Rmarkdown.
82+
83+
</body>
84+
</html>

0 commit comments

Comments
 (0)