knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
This vignette tests pkgdown output rendering for several use cases.
This document uses a variety of linking styles for testing purposes
Local:
vignette("pkgdown")
build_site()
?template_navbar
Remote:
MASS::enlist
MASS::enlist()
?MASS::enlist
%in%
?`%in%`
These shouldn't be linked.
Authors@R
content-home.html
toc: depth
x = y
# Shouldn't get linked enlist(5) # Should get linked MASS::enlist(5)
library(MASS) enlist(5)
# Should get linked because MASS was loaded previously enlist(5)
plot(1:10)
x <- readLines("test.txt") x
This should only be shown when required
Some R code
1 + 2
| col 1 | col 2 | col 3 | col 4 | |:---------------|:-----------|:-------:|:---------:| | Brightness | Total brightness, total reflectance, spectral intensity | $$y = x^2$$ | test |
$$f(x) = \dfrac{1}{\sqrt{2\pi\sigma^2}} e^{-\frac{(x-\mu^2)}{2\sigma^2}}$$
Inline equations: $y=x^2$
Test spacing above widget.
# 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.
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
stop(crayon::italic("This is italic"))
Some more text
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.