Skip to content

Different behaviour calling tar_* functions from Rmd #360

Closed Answered by wlandau
boshek asked this question in Help
Discussion options

You must be logged in to vote

Sounds like your R Markdown document is running from a different root directory from where you run tar_make(). Ideally they should agree. Or, you can run something like withr::with_dir("/my/targets/project/root/dir/", tar_read(my_target)) when you want to read a target in an Rmd. Alternatively, you can set knitr::opts_knit$set(root.dir = "/my/targets/project/root/dir/") in a code chunk at the top of the document.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@boshek
Comment options

Answer selected by boshek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants