Description Usage Arguments Details Author(s) See Also Examples
Insert a trellis plot object into the RTF document.
1 2 | ## S3 method for class 'RTF'
addTrellisObject(this, trellis.object, width=3, height=0.3, res=300, rotate=NULL, ...)
|
this |
An RTF object. |
trellis.object |
The trellis plot object. |
width |
Plot output width in inches. |
height |
Plot output height in inches. |
res |
Output resolution in dots per inch. |
rotate |
Object rotation in degrees. optional. |
... |
Not used. |
Plots are added to the document as PNG objects. Multi-page trellis objects are automatically split across multiple pages in the RTF output file. To rotate the object to landscape orientation within the RTF output, use rotate=90. When using rotation, width and height still refer to the unrotated plot dimensions and not the rotated output dimensions on the RTF page. An alternative to rotating the plot is to rotate the entire page using a call to addPageBreak with suitable page width and height dimensions.
Michael E. Schaffer
For more information see RTF
.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
rtf<-RTF("test_addTrellisObject.doc",width=8.5,height=11,font.size=10,omi=c(1,1,1,1))
if(require(lattice) & require(grid)) {
# multipage trellis object
p2<-xyplot(uptake ~ conc | Plant, CO2, layout = c(2,2))
addTrellisObject(rtf,trellis.object=p2,width=8,height=4,res=300, rotate=90)
}
done(rtf)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.