I do not think I know enough at this point to confidently offer an explanation. Is it possible to share a small reproducible example so we can investigate?
When you copy a drake
workflow from one machine to another, it is usually not enough to copy the .drake
folder if you want the targets to stay up to date. I strongly recommend you copy your entire project, including code files (and file_in()
/file_out()
/knitr_in()
files if you declared any). I know it may seem counterintuitive, but the status of each target depends on the functions and other objects loaded into your R session at the time, so the code that sources supporting scripts and calls make()
also needs to be copied. I recommend having a look at https://books.ropensci.org/drake/projects.html, especially https://books.ropensci.org/drake/projects.html#safer-interactivity. You may have better luck with r_make()
than regular make()
.
If you use namespaced function calls (e.g. pkg::fun()
) then you should also make sure your package environments agree between machines. In fact, both machines should probably have the same version of R and the same package environments anyway. renv
is great for locking down the package environment of a project.
For even more portability, containerization could really help. Example: https://gitlab.com/ecohealthalliance/drake-gitlab-docker-example.