> maybe the best is to CC Gorjan for feedback since he put lot of investigation > effort into R<->LyX communication thourgh noweb.
Thank you JMarc for this work and thank you Pavel for adding me into the discussion. I will update my local lyx repo and explore a bit. JMarc. About the working directory for R. If I understand correctly the problem is that LyX switches the directory during the compilation and this causes the problem for R. How about automatically inserting the following at the very top of the file (or somewhere before the first R chunk) - this would be done only for the compilation step <<>>= setwd(tmp) @ where tmp would be the directory where the "original" LyX file is present. In this way there would be no problems for R, but this creates another problem with paths for produced figures. Do you see any other solution along these lines? gg