Reputation: 536
I am developing a package locally with devtools
in RStudio. After modifying a function, when I try to call it from a project, R keeps using the old version of the function.
My workflow is to:
Build & Reload
Build & Reload
after that)library(my_library)
But the modification I just did would not be effective. What is wrong with this workflow?
Upvotes: 4
Views: 857
Reputation: 4907
?devtools::build
:
Building converts a package source directory into a single bundled file. If binary = FALSE this creates a tar.gz package that can be installed on any platform, provided they have a full development environment (although packages without source code can typically be install out of the box). If binary = TRUE, the package will have a platform specific extension (e.g. .zip for windows), and will only be installable on the current platform, but no development environment is needed.
My reading of this is that you still need to devtools::install()
your package. Building just creates the binary, it doesn't install the new version.
Upvotes: 1