Closed Antonov548 closed 5 months ago
when I ran the code in run_examples.R on my machine, my R session aborted. :sweat_smile:
when I ran the code in run_examples.R on my machine, my R session aborted. 😅
I see. It runs much more examples with this option and seems some of them failing.
Let's see what sanitizer will show in this case.
I'm so sorry I didn't think about the dontrun before.
For the record, how to put all examples in an Rmd file to then be knit
#! /usr/bin/env Rscript
library(igraph)
library(magrittr)
target_file <- file.path("vignettes", "articles", "examples.Rmd")
lines <- c(
"---", 'title: "examples"', "---", "",
"```{r}", "library(igraph)", "```", ""
)
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)
lines <- c(
lines, "",
sprintf("```{r rd='%s'}", rd_file),
example,
"```", ""
)
}
brio::write_lines(lines, target_file)
Let's open a new PR for debugging when needed.
Current Aviator status
This PR was closed without merging. If you still want to merge this PR, re-open it.