title: How to update function code in an R package?
body: <p>I have created and downloaded an R package using roxygen2 development tools. When I update the source code R files, the documentation updates fine, but the function code itself does not. How do I get the function code to update when I reinstall the package with install.packages("package-name")?</p>
  
  <p>I have tried inserting error messages at the beginning of every function using stop("..."). When I reinstall the code, the functions do not output an error message as they should but work as they did before I updated the code.</p>
  
  <p>Each time I update the code, I use the following commands:</p>
  
  <pre><code>devtools::document()
  devtools::install()
  
  install.packages("package-name", repos=NULL, type="source")
  library(package-name)
  </code></pre>
  
  <p>Just for further information, when I try to install the package this way:</p>
  
  <pre><code>install.packages("package-name")
  </code></pre>
  
  <p>I get the following error message:</p>
  
  <pre><code>Warning in install.packages :
    package ‘package-name’ is not available (for R version 3.6.0)
  </code></pre>
  
  <p>I got this same error message when my R version was 3.6.0, and even now after updating to 3.6.1</p>
  
  <p>I have not uploaded the package to any repositories, so I figured this makes sense, and instead install it locally from my package files with repos=NULL.</p>
  
  <pre><code>#' Roxygen comments - this part updates
  #'
  #' etc.
  functionName &lt;- function(...) {
   stop("...") 
   ...
   # This function should crash with an error message every time it is called, 
   # but instead the function body is never updated.
  }
  </code></pre>
  
  <p>Upon reinstalling the package, I expect the output of my functions to be an error message, but instead, they output the same result as they did before I updated the package.</p>
  
  <p>Documentation updates, function bodies do not.</p>