[R] Issues with Sweave and inclusion of graphics from nlme

Duncan Murdoch murdoch at stats.uwo.ca
Fri Apr 27 13:15:22 CEST 2007

On 4/27/2007 5:39 AM, caroline.truntzer at chu-lyon.fr wrote:
> Dear all,
> I'm using the nlme package. I would like to introduce the plot of my
> groupedData object in my latex report using Sweave but it doesn't work. 
> I have no error message in R (Sweave(my.file_Rnw)) and the plot is
> generated in R, but when I want to see the pdf (I'm using TexnicCenter) of
> my report, there is an error message and no pdf file is generated. It seems
> that the plot generated by plot.nmGroupedData is not found by TexnicCenter.
> Does anyone have an idea on how to solve this problem?

If the dot in the filename is real, I'd guess that's your problem. To 
confirm, take a look at the .tex file produced by Sweave.  Find the line 
corresponding to this figure.  It will be an \includegraphics call, 
something like


Your TeX is probably interpreting this as the file my.file_Rnw-fig 
rather than automatically adding the .pdf file extension, because it 
thinks you've specified the extension to be file_Rnw-fig.

Duncan Murdoch

More information about the R-help mailing list