Skip to content

sweave and lessR

4 messages · Scott Cushman, Duncan Murdoch

#
Hello

I am using sweave with the Density() function from lessR package. However, unlike the older color.density() function, Density() does not work with 
the standard graphic output functions in R, such as pdf. Is there away to include figures fgenerated rom lessR in sweave documents?

thank you
#
On 12-12-16 12:42 PM, Scott Cushman wrote:
Tell Density to write to "foo.pdf", then just use \includegraphics{foo} 
in your Sweave document.  (This assumes you're using pdflatex; it looks 
as though you can't do it at all if you can't handle PDF figures.)

Duncan Murdoch
#
Thank you for the reply. With many calls to Density() I miss Sweave taking care of the naming of the files and the generating of the \includegraphics statements, but I guess this will work.
On Dec 16, 2012, at 2:54 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:

            
#
On 12-12-16 3:12 PM, Scott Cushman wrote:
You (or the lessR author) could possibly write your own custom graphics 
device driver to work with Sweave; see "Graphics devices" in the Sweave 
vignette.  Or perhaps lessR could be configured to use the regular pdf() 
graphics driver.

Duncan Murdoch