My directory structure is as follows:
c:/Users/bob/MyPackageName
c:/Users/bob/MyPackageName/R
c:/Users/bob/MyPackageName/tests
c:/Users/bob/MyPackageName/tests/testthat
My development session normally consists of starting an R session in the package root (c:/Users/bob/MyPackageName), and running
devtools::load_all()
devtools::test()
followed by alternating the addition of little bits in MyPackageName/tests/testthat/mytest.R and in MyPackageName/R/mycode.R.
When starting a session returns
Loading MyPackageName
Error: object 'compute' not found whilst loading namespace 'MyPackageName'
I try:
- Calling an explicit 
devtools::load_all("c:/Users/bob/MyPackageName") - Searching for an errant instance of 
compute(package required, function name, anything..). But all is good. - Clearing some caches, 
rm(list=ls()). - Calling a localized 
devtools::load_all()from a session inc:/Users/bob/MyPackageName/tests/testthatand another inc:/Users/bob/MyPackageName/tests/testthat. - Regenerating the documentation through 
devtools::document(), lest some corruption in those has gone awry. - Delete 
MyPackageName/.RDataandMyPackageName/.Rhistory. 
But nothing. I still get Error: object 'compute' not found whilst loading namespace 'MyPackageName'
What else can I try? For example, what is the pre-Devtools method of "loading all"? What is "object 'compute'"?
When I start an R session outside of the package directory, all is well. Hence my R setup is fine; this question is in the context of writing an R package.