knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
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 = "" ) } }
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 = "" ) } }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.