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

Package examples

These examples/tutorials are available at (https://lindesaysh.github.io/MRSea)

files <- list.files("web", "\\.Rmd$")
for (file in file.path("web", 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://lindesaysh.github.io/MRSea/articles/",
      sub("\\.Rmd", ".html", file),
      ")\n",
      sep = ""
    )
  }
}

Package vignettes

These package vignettes are also available at (https://lindesaysh.github.io/MRSea)

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


lindesaysh/MRSea documentation built on May 11, 2024, 11:30 p.m.