Skip to content
Prev 69994 / 398506 Next

Sweave and paths

> Is there some way to encourage \SweaveInput{foo} to find foo in a  
  > subdirectory of a file tree?

Sure: Write some code doing it ;-)

  > Something along the lines of the  
  > behavior of list.files(<stuff>, recursive=TRUE). This would be very  
  > helpful at calling small modular files, such as solution sets and the  
  > like.

  > I couldn't see anything in the documentation, and I looked in the  
  > source code, but it seems that SweaveReadFiledoc() wants to look only  
  > in the directory which contains foo.

Well, if you know where it is you can always use the path in the
\SweaveInput{} statement, i.e.,

	\SweaveInput{foo/bar}

works for me.

Best,