Exclude directories from packrat::init dependency search

108 views
Skip to first unread message

Alex Gutteridge

unread,
Oct 22, 2015, 11:29:59 AM10/22/15
to packrat-discuss
I have some R scripts within the data/ subdirectory of my project that I wish to run packrat::init on. These scripts *are* data so I do not want them searched by packrat for dependencies when I run packrat::init, but there doesn't seem to be an option to exclude files/directories in this way. Am I missing something obvious or is there another workaround?

Kevin Ushey

unread,
Oct 22, 2015, 12:57:13 PM10/22/15
to Alex Gutteridge, packrat-discuss
Hi Alex,

We currently don't have a way of excluding certain files / directories in the dependency search. Perhaps this could be controlled with a project option; a vector of directories or files to ignore could be specified?

I'm not quite sure what the name would be, but something like:

    packrat::opts$dependencies.excluded.files = c(<files-and-directories-to-exclude>)

would probably work here. Any thoughts?

Kevin

On Thu, Oct 22, 2015 at 8:29 AM, Alex Gutteridge <alexgut...@gmail.com> wrote:
I have some R scripts within the data/ subdirectory of my project that I wish to run packrat::init on. These scripts *are* data so I do not want them searched by packrat for dependencies when I run packrat::init, but there doesn't seem to be an option to exclude files/directories in this way. Am I missing something obvious or is there another workaround?

--
You received this message because you are subscribed to the Google Groups "packrat-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packrat-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Gutteridge

unread,
Oct 27, 2015, 5:31:19 AM10/27/15
to packrat-discuss, alexgut...@gmail.com
Yes that looks like the solution I was hoping to find! I guess I was hoping there would be some .gitignore (https://git-scm.com/docs/gitignore) like syntax. (.packratignore?).
Reply all
Reply to author
Forward
0 new messages