knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
$$ u^2 = \frac{S r^2}{4 Kh D t} $$
$$ s(r, t) = \frac{Q}{4 \pi Kh D} * W(u) $$
$$ s(r) = D - \sqrt{D^2 - (\frac{Q}{\pi Kh}) log(\frac{r0}{r})} $$
$$ s(r,t) = h_0 (1 - erf(r \sqrt{\frac{S}{4 Kh D t}}) $$
r <- c(1, 10, 50, 100) edelman_s(r = r, S = 0.25, Kh = 7, D = 50, t = 1, h0 = -1)
library(tidyverse) library(hydranalytic) t <- c(1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121) r <- seq(from = 0, to = 700, by = 10) Kh <- 7 D <- 100 S <- 0.25 df <- expand.grid(t = t, r = r, Kh = Kh, D = D, S = S) df <- df %>% rowwise() %>% mutate(s = edelman_s(r = r, S = S, Kh = Kh, D = D, t = t, 1)) ggplot(data = df, aes(x = r, y = s, group = t, colour = t)) + geom_line() + scale_y_continuous(breaks=seq(from = 0, to = 1, by = 0.2)) + scale_x_continuous(breaks=seq(from = 0, to = 700, by = 100))
Vignettes are long form documentation commonly included in packages. Because they are part of the distribution of the package, they need to be as compact as possible. The html_vignette
output type provides a custom style sheet (and tweaks some options) to ensure that the resulting html is as small as possible. The html_vignette
format:
Note the various macros within the vignette
section of the metadata block above. These are required in order to instruct R how to build the vignette. Note that you should change the title
field and the \VignetteIndexEntry
to match the title of your vignette.
The html_vignette
template includes a basic CSS theme. To override this theme you can specify your own CSS in the document metadata as follows:
output: rmarkdown::html_vignette: css: mystyles.css
The figure sizes have been customised so that you can easily put two images side-by-side.
plot(1:10) plot(10:1)
You can enable figure captions by fig_caption: yes
in YAML:
output: rmarkdown::html_vignette: fig_caption: yes
Then you can use the chunk option fig.cap = "Your figure caption."
in knitr.
You can write math expressions, e.g. $Y = X\beta + \epsilon$, footnotes^[A footnote here.], and tables, e.g. using knitr::kable()
.
knitr::kable(head(mtcars, 10))
Also a quote using >
:
"He who gives up [code] safety for [code] speed deserves neither." (via)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.