Examples on the inlabru website

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Package examples

These potentially long running examples/tutorials are available on (https://inlabru-org.github.io/inlabru/)

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://inlabru-org.github.io/inlabru/articles/",
      sub("\\.Rmd", ".html", basename(file)),
      ")\n",
      sep = ""
    )
  }
}

Package vignettes

These package vignettes are also available on (https://inlabru-org.github.io/inlabru/)

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://inlabru-org.github.io/inlabru/articles/",
      sub("\\.Rmd", ".html", file),
      ")\n",
      sep = ""
    )
  }
}


Try the inlabru package in your browser

Any scripts or data that you put into this service are public.

inlabru documentation built on Nov. 2, 2023, 6:07 p.m.