[R] exporting text output to pdf

David Winsemius dwinsemius at comcast.net
Mon Jan 18 23:54:22 CET 2010


On Jan 18, 2010, at 5:07 PM, Dimitri Shvorob wrote:

>
> ... You can modify this (dysfunctional) snippet.
>
> pdf()
> plot.new()
> mtext("Lorem ipsum dolor sit amet, consectetur adipiscing elit.  
> Quisque leo
> ipsum, ultricies scelerisque volutpat non, volutpat et nulla.  
> Curabitur
> consequat ullamcorper tellus id imperdiet. Duis semper malesuada  
> nulla,
> blandit lobortis diam fringilla at. Vestibulum nec tellus orci, eu
> sollicitudin quam. Phasellus sit amet enim diam. Phasellus mattis  
> hendrerit
> varius. Curabitur ut tristique enim. Lorem ipsum dolor sit amet,  
> consectetur
> adipiscing elit. Sed convallis, tortor id vehicula facilisis, nunc  
> justo
> facilisis tellus, sed eleifend nisi lacus id purus. Maecenas tempus
> sollicitudin libero, molestie laoreet metus dapibus eu. Mauris justo  
> ante,
> mattis et pulvinar a, varius pretium eros. Curabitur fringilla dui  
> ac dui
> rutrum pretium. Donec sed magna adipiscing nisi accumsan congue sed  
> ac est.
> Vivamus lorem urna, tristique quis accumsan quis, ullamcorper aliquet
> velit.")
> mtext("A nice-looking paragraph! Now this is what I call good  
> advice!")
> dev.off()

pdf()
plot(1,1, col="white");
text(0.58,1, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.  
Quisque leo
ipsum, ultricies scelerisque volutpat non, volutpat et nulla. Curabitur
consequat ullamcorper tellus id imperdiet. Duis semper malesuada nulla,
blandit lobortis diam fringilla at. Vestibulum nec tellus orci, eu
sollicitudin quam. Phasellus sit amet enim diam. Phasellus mattis  
hendrerit
varius. Curabitur ut tristique enim. Lorem ipsum dolor sit amet,  
consectetur
adipiscing elit. Sed convallis, tortor id vehicula facilisis, nunc justo
facilisis tellus, sed eleifend nisi lacus id purus. Maecenas tempus
sollicitudin libero, molestie laoreet metus dapibus eu. Mauris justo  
ante,
mattis et pulvinar a, varius pretium eros. Curabitur fringilla dui ac  
dui
rutrum pretium. Donec sed magna adipiscing nisi accumsan congue sed ac
est. Vivamus lorem urna, tristique quis accumsan quis, ullamcorper  
aliquet
velit.", adj = 0)
mtext("A nice-looking paragraph! Now this is what I call good advice!")
dev.off()

You earlier got advice to look at Sweave and it's sounding more and  
more that was what you are needing, if not what you are expressing  
very clearly. R is not a markup language but it can be integrated with  
Tex.

-- 
David.


> -- 
> View this message in context: http://n4.nabble.com/exporting-text-output-to-pdf-tp837699p1017087.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT



More information about the R-help mailing list