[R] SweaveInput and absolute paths

2007-04-27 Thread Kevin R. Coombes
The path is correct, and the file exists.  Here is a transcript of the R 
session:

-
  sessionInfo()
R version 2.4.0 (2006-10-03)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] methods   stats graphics  grDevices utils  datasets
[7] base
  getwd()
[1] G:/Working/Fidler-Nakamura-Periphery
  dir(M:/Resources/Affymetrix)
  [1] affyExample.Rnw affyExample.tex affyplots.Rnw  chkMiame.Rnw
  [5] fnp.Rnw libLoad.Rnw readCel.Rnwrma.Rnw
  [9] rnadeg.Rnw  simpleQC.Rnw
  Sweave(affyExample.Rnw)
Writing to file affyExample.tex
Processing code chunks ...
Error in SweaveReadFile(c(ifile, file), syntax) :
 no Sweave file with name 
'./M:/Resources/Affymetrix/libLoad.Rnw' found
In addition: Warning message:
list.files: './M:/Resources/Affymetrix' is not a readable directory
-

Dieter Menne writes:
  Kevin R. Coombes krc at mdacc.tmc.edu writes:
 
  
   Is there a way to turn off the automatic inclusion of ./ at the
   beginning of a path specified in an \SweaveInput{} instruction?
  
 
  Giving a full file path name works for me (Windows, R 2.4.1)
 
  \SweaveInput{C:/tmp/MyTitle.rnw}
 
  Note the if the path does not exist, e.g
 
  \SweaveInput{C:/tmpnotexist/MyTitle.rnw},
 
  the error message refert to  ./C:/tmpnotexist/MyTitle.rnw, so it
  could be that the path you chose had been incorrectly entered.
 
  Dieter

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] SweaveInput and absolute paths

2007-04-26 Thread Kevin R. Coombes
Hi,

Is there a way to turn off the automatic inclusion of ./ at the 
beginning of a path specified in an \SweaveInput{} instruction?

I'd like to create some reusable template modules of Sweave code and 
put them in a standard directory like
/Resources/Affymetrix
Then the corresponding file that uses one of these would include a 
command like

\SweaveInput{/Resources/Affymetrix/libload.Rnw}

If I try that (in R 2.4.0 on either Windows or UNIX), however, I get an 
error message to the following effect:

Writing to file affyExample.tex
Processing code chunks ...
Error in SweaveReadFile(c(ifile, file), syntax) :
no Sweave file with name './/Resources/Affymetrix/libload.Rnw' found
In addition: Warning message:
list.files: './/Resources/Affymetrix' is not a readable directory

Of course it cannot find the files if it insists on looking in the wrong 
place

On a related note, where is SweaveInput documented besides in the R help 
archives?

Thanks,
Kevin

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] SweaveInput and absolute paths

2007-04-26 Thread Dieter Menne
Kevin R. Coombes krc at mdacc.tmc.edu writes:

 
 Is there a way to turn off the automatic inclusion of ./ at the 
 beginning of a path specified in an \SweaveInput{} instruction?
 

Giving a full file path name works for me (Windows, R 2.4.1)

\SweaveInput{C:/tmp/MyTitle.rnw}

Note the if the path does not exist, e.g

\SweaveInput{C:/tmpnotexist/MyTitle.rnw},

the error message refert to  ./C:/tmpnotexist/MyTitle.rnw, so it could be that
the path you chose had been incorrectly entered.

Dieter

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.