Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • cca47f3
  • /
  • vignettes
  • /
  • test
  • /
  • rendering.Rmd
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:44e4b2a4311b1d5854f889abcf5ece6f3a4e5ad9
directory badge
swh:1:dir:583492c2a8c2cc9488e1a50c8cdb33211896b608

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
rendering.Rmd
---
title: "Test: Output Rendering"
---

```{r include = FALSE}
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
```

This vignette tests pkgdown output rendering for several use cases.

# Highlighting

This document uses a variety of linking styles for testing purposes

## Inline code

Local:

* `vignette("pkgdown")`
* `build_site()`
* `?template_navbar`

Remote:

* `MASS::enlist`
* `MASS::enlist()`
* `?MASS::enlist`
* `%in%`
* `` ?`%in%` ``

## Spurious links

These shouldn't be linked.

* `Authors@R`
* `content-home.html`
* `toc: depth`
* `x = y`

## Code blocks

```{r, eval = FALSE}
# Shouldn't get linked
enlist(5)
# Should get linked
MASS::enlist(5)
```

```{r}
library(MASS)
enlist(5)
```

```{r}
# Should get linked because MASS was loaded previously
enlist(5)
```

---

# Figures

```{r}
plot(1:10)
```

---

# External files

```{r}
x <- readLines("test.txt")
x
```

![](bacon.jpg)

---

# Details tag

<details>
  This should only be shown when required
</details>

<details>
<summary>Some R code</summary>
  
```{r}
1 + 2
```
</details>

---

# Tables

| col 1 | col 2 | col 3 | col 4 |
|:---------------|:-----------|:-------:|:---------:|
| Brightness     | Total brightness, total reflectance, spectral intensity | $$y = x^2$$ | test |

---

# Mathjax

$$f(x) = \dfrac{1}{\sqrt{2\pi\sigma^2}} e^{-\frac{(x-\mu^2)}{2\sigma^2}}$$

Inline equations: $y=x^2$

---

# Widgets

Test spacing above widget.

```{r, echo=FALSE}
# set seed for reproducible widget id
if (requireNamespace("htmltools", quietly = TRUE)) {
  htmlwidgets::setWidgetIdSeed(42)
}

library(leaflet)

leaflet() %>%
  addTiles() %>%
  addMarkers(
    lng=174.768,
    lat=-36.852,
    popup="The birthplace of R"
  )
```

Test spacing below widget.

---

# Crayon

```{r}
cat(crayon::red("This is red"), "\n")
cat(crayon::blue("This is blue\n"), "\n")

message(crayon::green("This is green"))

warning(crayon::bold("This is bold"))
```
Some text

```{r, error = TRUE}
stop(crayon::italic("This is italic"))
```

Some more text

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API