Setup:
- I'm editting the body of a function
foo.bar()in my own packageMyPkg. - I launch an R session in the root of the package (where
DESCRIPTIONsits). For good measure, I start cleanly
devtools::reload()
To confirm which version of
foo.barinMyPkgI'd be running I call:find("foo.bar")
and get:
[1] ".GlobalEnv"
This means that when I call foo.bar I'd be calling the function installed for my user account.
It's obscure to me how MyPkg got installed for my user account (or why it's necessary), possibly just calling devtools::reload() or devtools::test() did that.
How do I specify that I'd like to call the freshest version of a given function, from the current <root>/R folder?