-
I am working in a windows 10 environment with CRAN versions of targets (0.2.0) and tarchetypes (0.1.0). When I run something like: tar_read(some_target) I get different behaviour depending where I called it. If I run this on the console or from a If, however, I call this from an Error: utility functions like tar_read() and tar_progress() require a _targets/ data store produced by tar_make() or similar. So far deleting the Calling Anyone have any ideas what might be happening here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Sounds like your R Markdown document is running from a different root directory from where you run |
Beta Was this translation helpful? Give feedback.
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 likewithr::with_dir("/my/targets/project/root/dir/", tar_read(my_target))
when you want to read a target in an Rmd. Alternatively, you can setknitr::opts_knit$set(root.dir = "/my/targets/project/root/dir/")
in a code chunk at the top of the document.