49
RTF
15
addTOC
Insert table ofcontents field.
addTable
Insert a table into the RTF document.
addText
Insert text into the RTFdocument.
addTrellisObject InsertatrellisplotobjectintotheRTFdocument.
decreaseIndent
Decrease RTF document indent.
done
Write and close the RTFoutput.
endParagraph
End a paragraph in the RTF document.
increaseIndent
Increase RTF document indent.
setFontSize
Set RTFdocument font size.
startParagraph
Start a new paragraph in the RTF document.
view
View encoded RTF.
Methods inherited from Object:
$, $<-, [[, [[<-, as.character, attach, attachLocally, clearCache, clearLookupCache, clone, detach,
equals,extend,finalize,gc,getEnvironment,getFieldModifier,getFieldModifiers,getFields,getInstan-
tiationTime, getStaticInstance,hasField, hashCode, ll, load, objectSize, print,save
Author(s)
Michael E.Schaffer
See Also
Formore information seeRTF.
Examples
## Not run:
output<-"test_RTF-class.doc"
png.res<-300
rtf<-RTF(output,width=8.5,height=11,font.size=10,omi=c(1,1,1,1))
addHeader(rtf,title="Test",subtitle="2011-08-15\n")
addPlot(rtf,plot.fun=plot,width=6,height=6,res=300, iris[,1],iris[,2])
# Try trellis plots
if(require(lattice) & require(grid)) {
# single page trellis objects
addPageBreak(rtf, width=11,height=8.5,omi=c(0.5,0.5,0.5,0.5))
p <- histogram( ~ height | voice.part, data = singer, xlab="Height")
addTrellisObject(rtf,trellis.object=p,width=10,height=7.5,res=png.res)
p <- densityplot( ~ height | voice.part, data = singer, xlab = "Height")
addTrellisObject(rtf,trellis.object=p,width=10,height=7.5,res=png.res)
# multipage trellis object
p2<-xyplot(uptake ~ conc | Plant, CO2, layout = c(2,2))
addTrellisObject(rtf,trellis.object=p2,width=6,height=6,res=png.res)