Kevin Middleton <[EMAIL PROTECTED]> writes:
> This may be more of an R question than a LyX question, but I thought  
> I would try lyx-users first.

I think this is the right place.

> Following the instructions on the wiki (http://wiki.lyx.org/LyX/ 
> LyxWithRThroughSweave), I successfully setup Rweave (with an small OS  
> X caveat, see below). Including R graphics as floats works fine, but  
> I can't figure out how to get graphics included inline. I don't even  
> know if this is possible. Using the Insert -> Graphics dropdown  
> brings up a dialog box -- so nowhere to put the Rweave code.
> 
> I also tried putting \includegraphics in an ERT box with the sweave  
> code inside the {}, but it goes looking for a file called  
> <<label=fig1,fig=T,echo=F>>=plot(1:10) <at> . Is there some way to wrap  
> the Rweave code?

Hmm, good catch. I might be wrong, but as far as I can tell this is not
possible. By definition, noweb file must have << in the first column of the
file. Therefore you could only use inline graphics as the very first thing in a
paragraph. But this will work only with ERT and not with scrap style, since that
produces its own paragraph.

> On a separate note, I'm running LyX 1.4.4 in OS X. Starting LyX from  
> the LyX.app bundle and then trying to view PDF generates the  
> following error: "an error occurred whilst running Rweave  
> 'testfile.nw'". However, if LyX is started from the command line with  
> "/Applications/LyX.app/Contents/MacOS/lyx", then Rweave works fine. I  
> was going to add this to the LyxWithRThroughSweave wiki page as a  
> note. But could another OS X user confirm this behavior for me?

I am not an OS X user, but I imagine that Rweave cries due to path problems.

Gregor



Reply via email to