addCodeBlock.bsdoc
From ReporteRs v0.8.2
by David Gohel
Add a code block into a bsdoc object
Add a code block into a bsdoc
object.
Usage
# S3 method for bsdoc
addCodeBlock(doc, file, text,
par.properties = parProperties(), text.properties = textProperties(color =
"#A7947D"), ...)
Arguments
- doc
bsdoc
object where expressions have to be added- file
file. Not used if text is provided.
- text
character vector. The text to parse. Not used if file is provided.
- par.properties
code block paragraph properties. An object of class
parProperties
- text.properties
code block text properties. An object of class
textProperties
- ...
further arguments, not used.
Value
an object of class bsdoc
.
See Also
Examples
# NOT RUN {
#START_TAG_TEST
doc.filename = "addCodeBlock/example.html"
# set default font size to 11
options( "ReporteRs-fontsize" = 11 )
doc = bsdoc( )
doc = addCodeBlock( doc, text = "ls -a\nwhich -a ls" )
# Write the object
writeDoc( doc, file = doc.filename )
#STOP_TAG_TEST
# }
Community examples
Looks like there are no examples yet.