views:

29

answers:

2

I have a R package in the directory ~/package; I also keep the output from my use of the package in the directory ~/package/out. When the content of ~/package/out gets very large, it takes minutes instead of seconds to build this package. Is there a way to have "R CMD build package" ignore the ~/package/out directory?

+3  A: 

See the documentation on the .Rbuildignore file in building packages section of the R-Extensions manual.

Joshua Ulrich
Brevity fail...
Joshua Ulrich
+5  A: 

You are a little short on details about what is in there --- but R CMD respects .Rbuildignore.

Here is a real example:

edd@max:~$ cat svn/rinside/pkg/.Rbuildignore 
inst/doc/html
inst/doc/latex
inst/doc/man
inst/doc
inst/lib
edd@max:~$ 

which tells R CMD build to ignore the doxygen=-generated documentation, as well as a library directory.

Dirk Eddelbuettel
Second place is the first loser (or that's what my mother said).
Shane
+1 For providing an example, and having more words.
Shane
Thanks for the example - I just put "out" in the file, and also found that out/*Rdata works as well. although, notably, if it was "out/" or "*Rdata", I got an error "Quantifier follows nothing in regex.
David