How to update locally created R package without reinstalling

Viewed 472

I created an R package using this tutorial. The package loads just fine when called but requires a bit debugging. After debugging my script, I used devtools::update_packages("new_package") to fix the changes, but I receive the following error: Skipping 1 packages not available: new_package (interestingly, new_package shows up when I call installed.packages()).

I'm able to update my package by reinstalling with devtools::install("new_package"), but for simple fixes this doesn't seem very efficient. Perhaps there is another way? I appreciate any help or insight.

EDIT for clarification: I understand the package needs to be reloaded to update changes, but reloading the package using library(mypackage) (after detaching the package or starting a new session) does not accomplish this while devtools::update_packages("path/to/mypackage") does. Per the tutorial, I decided to install my package using devtools::install(). Is this because the process of installing my homebrew package requires setting up repository for updates?

0 Answers
Related