As the title indicates I am looking for suggestion on to document Rmarkdown params. I am several Rmarkdown
documents with multiple (>5) non-trivial parameters, which I want to share with colleagues. For example:
---
title: "My report"
output:
html_document:
toc: true
toc_float: true
theme: united
code_folding: hide
date: "`r format(Sys.time(), '%d %B, %Y')`"
author: "`r Sys.info()['user']`"
params:
res_file: "results.tsv"
gs_species: "Homo sapiens"
gs_category: "All"
gmt_file: NULL
extra_sets: NULL
gs_string: NULL
padjCutoff: 0.1
---
I could add some light description as comments but it will get pretty large pretty fast:
---
title: "My report"
output:
html_document:
toc: true
toc_float: true
theme: united
code_folding: hide
date: "`r format(Sys.time(), '%d %B, %Y')`"
author: "`r Sys.info()['user']`"
params:
res_file: "results.tsv" # [string] Path to results file generated by script `generate_results.R`
gs_species: "Homo sapiens" # [string] Organisms. Use binomial species nomenclature, currently only Homo sapiens is accepted- `
gs_category: "All" # [string vector] Which categories, as listed in the site.blah.categories.html
gmt_file: NULL # [string] Path to file containing things
extra_sets: NULL # [string] Path to file containing one set per line. Use the set names listed in the site site.blah.categories.html
gs_string: NULL # [string] Used for partial matching of sets. When you are too lazy to look the site above.
padjCutoff: 0.1 # [numerical] Where to draw the line of what matters
---
Or alternatively use take advantage of Knit with Parameters
and use the variable label
as descriptor of the parameter: 15.3 Knitting with parameters | R Markdown: The Definitive Guide
Any thoughts are appreciated.
Cheers.