Re: [R] Problem compiling Rnw file

2012-11-06 Thread Riccardo Romoli
Hi, using the full_path I solved the problem. Thanks for your precious suggestion!!! Best Riccardo On Mon, Nov 5, 2012 at 6:12 PM, Yihui Xie wrote: > Let me clarify a little bit about me comments on SO: setwd() should be > called in the first place before you work on anything, and it should > ne

Re: [R] Problem compiling Rnw file

2012-11-05 Thread Yihui Xie
Let me clarify a little bit about me comments on SO: setwd() should be called in the first place before you work on anything, and it should never be used in the middle of a project (if you do, you need to restore it later). Presumably Sweave writes the output file using something like cat(output, f

Re: [R] Problem compiling Rnw file

2012-11-05 Thread Jessica Streicher
I'll second the full path option. Just create a variable path_to_data and concatenate it with the names of any files you need in that directory. You could also try to use relative paths if the data is "nearby" and is likely to not change that position. e.g. if the data was in '/home/r/Documents

Re: [R] Problem compiling Rnw file

2012-11-05 Thread Marc Schwartz
On Nov 5, 2012, at 9:23 AM, Riccardo Romoli wrote: > Dear R list, > I'm using R 2.15.2 with TeX Live 2009 and ESS 12.09 . I have a R > project in the '/home/r/Documents/myproj/', which is my working > directory (where I have the .Rnw file). Inside the document I have > several "setwd()" to collec

[R] Problem compiling Rnw file

2012-11-05 Thread Riccardo Romoli
Dear R list, I'm using R 2.15.2 with TeX Live 2009 and ESS 12.09 . I have a R project in the '/home/r/Documents/myproj/', which is my working directory (where I have the .Rnw file). Inside the document I have several "setwd()" to collect the datasets I use. After I compile from the terminal using