Even though I duly setwd()
(within an R session running in an Emacs/ESS buffer) to the root of my R package and run devtools::load_all()
there, when I call a function I find that I am running a version of the function that no longer exists in the present R package. Running rm(<function_name>)
, followed by source
-ing the relevant file, do not help.
Might I perhaps be running a version of the package that I inadvertently installed?, I ask myself. I run lapply(.libPaths(), dir)
to answer, but my package does not appear.
What is happening? Where/how is this caching happening?
Update
Running
rm(list=ls())
as described here solved the problem. Although it's not clear what the problem might have been in the first place. An explanation is very welcome.