Skip to content
Snippets Groups Projects
Commit 1e4967ef authored by Holger Brandl's avatar Holger Brandl
Browse files

added table of contents options to spin.R

parent 16d3abec
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@ Use knitr to spin R documents
Usage: spin.R [options] <r_script> [<quoted_script_args>]
Options:
--toc Add a table of contents
-c Cache results
-e Show Code
-w Show warnings
......@@ -100,7 +101,15 @@ opts_chunk$set(
width=200
)
knit2html(basename(rmdScript), header=cssHeader)
knitOptions <- c()
## optionally render toc
## see http://stackoverflow.com/questions/25872558/generating-a-table-of-contents-toc-when-using-knitrs-spin
if(spin_opts$toc){
knitOptions= c("toc", markdown::markdownHTMLOptions(TRUE))
}
knit2html(basename(rmdScript), header=cssHeader, options = knitOptions)
## also remove the .md and the .Rmd files
if(is.logical(keep_markdown_files) & !keep_markdown_files){
......
......@@ -26,7 +26,7 @@ spinsnip(){
echo "spining $tmpR..."
shift
spinr $tmpR $*
spinr -e $tmpR $*
# rm -r $(dirname $tmpR)
rm ${tmpR}
......
......@@ -136,8 +136,8 @@ export -f CountFastqGzReads
IndexBams(){
for bamFile in $1; do
sem -j5 -no-notice samtools index $bamFile;
for bamFile in $@; do
sem -j5 samtools index $bamFile;
done
sem -no-notice --wait
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment