I know it is not best practice to use the R package called drake
within a notebook tool, but I'm doing it anyway as a workaround for the limitations to the collaboration infrastructure we have on my team at work. Since my code is broken up into chunks that are distributed throughout sections of the notebook, it would be useful to have multiple analysis plans, which I would execute in the appropriate section, and other plans may be written and executed in subsequent sections of the notebook. Is it possible to write multiple plans in drake
?
Asked
Active
Viewed 766 times
9

tomash
- 12,742
- 15
- 64
- 81

Brash Equilibrium
- 1,357
- 4
- 14
- 35
-
Whoever flagged this question as subjective should really take it back. The question isn’t subjective, I just misapplied a tag. I will escalate if this isn’t fixed. Or maybe it’s just a bug, but I can’t edit the post to improve it by removing a misapplied tag because I get an error message that the question appears subjective. – Brash Equilibrium Jun 27 '18 at 23:37
-
1Eric, thanks for editing the tag where I couldn’t. – Brash Equilibrium Jun 29 '18 at 05:55
2 Answers
6
Sorry I am late to this thread. I am the maintainer of the drake
R package, and I usually expect to receive questions on the issue tracker. A drake-r-package
StackOverflow tag would really help me keep up, but I do not have that privilege.
Anyway, interesting use case. I do see some workarounds:
- Separate caches for separate plans.
drake
usesstorr
to cache its targets, and you could create different caches for different sections of your report. Essentially, your report would manage a bunch of separatedrake
projects. See this chapter in the manual for more on the caching system. Use thecache
argument tomake()
to supply a manual or non-defaultstorr
cache. - Separate plans and a single cache. Here, you would need to ensure that each plan has a completely unique set of targets. If there is overlap, then some targets will always rebuild whenever your run the report.
- A single cumulative plan. Essentially, when it comes time to build additional targets as you move through the report, you can add new rows to an existing plan. In fact, this is the recommended approach for large complex projects (related example here). For even more control, use the
targets
argument tomake()
to only build a select few targets and their out-of-date dependencies.

Richard J. Acton
- 885
- 4
- 17

landau
- 5,636
- 1
- 22
- 50
-
1
-
1@landau you have your requested tag now, https://stackoverflow.com/questions/tagged/drake-r-package – tomash Jul 17 '18 at 13:57
-
-1
I’m not sure i understand the question? We often use drake in jupyter notebook, and do try to support that use case (via the python bindings).
By “plans”, do you mean mathematical programs? Or inverse kinematics calls? Both should be ok in a notebook framework. Or are you actually calling them in parallel?
Not sure how R fits into it?

Russ Tedrake
- 4,703
- 1
- 7
- 10
-
It should be clear from the title of the question that there is an R package called drake. If you look in the documentation, its developers are against its usage in notebooks. – Brash Equilibrium Jun 27 '18 at 14:49
-
If you read the description for the `drake` tag on StackOverflow (available if you mouse-over the tag), it is for the C++ Control + Planning Toolbox, not the R package, hence the initial confusion. If you want to tag something for the R Package, you should create a separate tag, or find someone who can create that tag. For this post, you should remove the `drake` tag to make your intent clear. – Eric Cousineau Jun 27 '18 at 21:53
-
Ah, thanks! I’ll do that. I believe I have tag creation privileges – Brash Equilibrium Jun 27 '18 at 23:32
-
Or rather I WOULD remove the tag and improve the question if the question had not been apparently flagged unjustifiably as “subjective” according to an error I received while trying to remove the tag. – Brash Equilibrium Jun 27 '18 at 23:35