What does “evaluate chunks in directory” do?

What, exactly, does “evaluate chunks in directory” in the R Markdown settings do?

If I set it to “Document” and then run a chunk in an Rmd file, it runs in the current R working directory—not the directory of the Rmd file.

  • Is this the expected behavior?
  • Does that mean the setting only applies when knitting?
  • If so, does this mean knitr will ignore `knitr::opts_knit$set(
  • root.dir = path)`

You may find interesting this chapter of the R Markdown Cookbook

It explains how it works in general and the different options to tweak it.

Hope it helps

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.