Feature request: dependencies tree

7 views
Skip to first unread message

Edward Wallace

unread,
May 10, 2015, 12:32:43 PM5/10/15
to kn...@googlegroups.com
Hi Yihui,
I'd like to request the feature for code chunk dependencies, to be able to:
(1) View the dependencies as a flow chart or text.
(2) In RStudio, be able to run a code chunk and the entire path of its dependencies.

These would be useful in two situations I find myself in. First, when I rearrange the order of code chunks, or adapt some chunks into a new file, and want to check the dependencies are in place. Second, when I'm adding to or debugging one chunk of a large document from the command line, and want to load the relevant data without waiting for _everything_ to run.
This might be a symptom of poor code design on my part; I think these features would help me design better code.

Thanks as ever for making & maintaining a wonderful tool.
Edward

Yihui Xie

unread,
May 12, 2015, 11:23:51 PM5/12/15
to Edward Wallace, knitr
Hi Edward,

Internally, the dependency structure is stored in knitr:::dep_list,
and you can probably create such a flow chart from
knitr:::dep_list$get().

For the second situation, you may take a look at ?knitr::load_cache

Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Web: http://yihui.name
Reply all
Reply to author
Forward
0 new messages