---
title: "Full vignette/examples list"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Full vignette/examples list}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

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

```{r setup, echo=FALSE,include=FALSE}
```

## Package vignettes

These package vignettes are available in the R package and on
[`https://davidbolin.github.io/excursions/`](https://davidbolin.github.io/excursions/):

```{r, echo=FALSE,results="asis"}
files <- list.files(".", "\\.Rmd$")
for (file in files) {
  lines <- readLines(file, n = 10)
  title_idx <- grep("^title: ", lines)
  if (length(title_idx) > 0) {
    title <- sub("^title: ", "", lines[title_idx[1]])
    title <- sub('^"', "", title)
    title <- sub('"$', "", title)
    cat("* [",
      title,
      "](https://davidbolin.github.io/excursions/articles/",
      sub("\\.Rmd", ".html", file),
      ")\n",
      sep = ""
    )
  }
}
```

## Package examples

Package examples using
[`https://www.r-inla.org`](https://www.r-inla.org) are available on
[`https://davidbolin.github.io/excursions/`](https://davidbolin.github.io/excursions/):

```{r, echo=FALSE,results="asis"}
files <- list.files("articles", "\\.Rmd$")
for (file in file.path("articles", files)) {
  lines <- readLines(file, n = 10)
  title_idx <- grep("^title: ", lines)
  if (length(title_idx) > 0) {
    title <- sub("^title: ", "", lines[title_idx[1]])
    title <- sub('^"', "", title)
    title <- sub('"$', "", title)
    cat("* [",
      title,
      "](https://davidbolin.github.io/excursions/articles/",
      sub("\\.Rmd", ".html", basename(file)),
      ")\n",
      sep = ""
    )
  }
}
```

