#! /usr/bin/env Rscript
library(igraph)
library(magrittr)
rd_files <- list.files("./man", pattern = "\\.Rd$", full.names = TRUE)
exfile <- tempfile()
for (rd_file in rd_files) {
tools::Rd2ex(rd_file, out = exfile, commentDontrun = FALSE)
if (!file.exists(exfile)) {
next
}
example <- readLines(exfile)
eval(parse(text = paste(example, collapse = "\n")))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.