addParagraph
From ReporteRs v0.5
by David Gohel
Add a paragraph into a document object
Add a paragraph into a document object
Usage
addParagraph(doc, value, ...)
Arguments
- doc
document object
- value
character vector containing texts to add OR an object of class
set_of_paragraphs
. A set_of_paragraphs object is a container forpot
objects.- ...
further arguments passed to other methods
Details
a paragraph is a set of texts that ends with an end of
line('\n'
in C). Read pot
to see how
to get different font formats. Trying to insert a
'\n'
will have no effect. If an end of line is
required , a new paragraph is required.
Value
a document object
See Also
docx
, addParagraph.docx
,
pptx
, addParagraph.pptx
,
html
, addParagraph.html
Examples
# NOT RUN {
# Add "Hello World" into the document doc
doc <- addParagraph(doc, "Hello Word!");
# Add into the document : "My tailor is rich" and "Cats and Dogs"
# format some of the pieces of text
pot1 = pot("My tailor", textProperties(color="red") ) + " is " + pot("rich"
, textProperties(font.weight="bold") )
my.pars = set_of_paragraphs( pot1 )
pot2 = pot("Cats", textProperties(color="red") ) + " and " + pot("Dogs"
, textProperties(color="blue") )
my.pars = set_of_paragraphs( pot1, pot2 )
doc <- addParagraph(doc, my.pars )
# }
Community examples
Looks like there are no examples yet.