Commit 17fb0784 authored by Dorchies David's avatar Dorchies David

test: Running examples should be with local = FALSE

Otherwise variables produced by the example are not available after.
Refs #52
parent f41246f6
......@@ -50,7 +50,7 @@ RunRmdChunks <- function(fileRmd,
sTxt = gsub("trace\\s?=\\s?[0-9]+", "trace = 0", sTxt)
# Add parameters to example calls
exLines = grep("^example\\(.*\\)", sTxt)
sTxt[exLines] = paste0(substr(sTxt[exLines], 1, nchar(sTxt[exLines]) - 1), ", local = TRUE, echo = FALSE, verbose = FALSE, ask = FALSE)")
sTxt[exLines] = paste0(substr(sTxt[exLines], 1, nchar(sTxt[exLines]) - 1), ", echo = FALSE, verbose = FALSE, ask = FALSE)")
# Remove question "Hit <Return> to see next plot"
sTxt = c("par(ask=F)", sTxt)
# Write the transformed script
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment