Description Usage Arguments Details Examples
This function returns the contents of an R help file to the console
as a character vector, printing it for easy reading. It is intended for
dynamic documents where you want to show part of a help
file in the course of a tutorial. For this usage, you may wish to temporarily
assign help_console
to help
using non-printed code chunk.
1 2 |
topic |
The help topic, quoted or not |
format |
the format of the help topic. HTML and latex may be useful when creating documents of this type, in which case the output should be written "as is" rather than in a code or verbatim environment |
lines |
Optional. An integer vector specifying which lines to print |
before, after |
Text to insert before or after the help file, such as
|
This function uses non-exported functions in the tools
package, so
it may not work with future updates.
Found at https://www.r-bloggers.com/printing-r-help-files-in-the-console-or-in-knitr-documents/
1 2 3 | help_console(c)
txt <- help_console(c)
help_console(optim, "html", lines=1:25, before="<quote>", after="</quote>")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.