knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Sometimes you just want to run some code you've commented out.
Do you
**Also works great for interactively running examples in roxygen markup!
You can install the development version of nocomment from github with:
remotes::install_github("adam-gruer/noComment")
Restart R after installing the package.
Assign a keyboard shortcut to the Run commented source lines addin e.g Ctrl + '
Is noComment not stripping out all your weird and wonderful commenting markup? Hey, you do you!
noComment uses this regex "^\\s*#+\\s*'*"
to strip put comment symbols from the start of lines, mainly # #' and any spaces.
If you have improvements to this let me know in an issue. But also you can use your own by setting the noComment.regex option to whatever regular expression you desire like so (note, example is not a real regex)
options(noComment.regex = "^\\\\\\\\\\\\\\\\\\\\s()+[1-9]*")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.