[Rd] invisible functions

Duncan Murdoch murdoch@dunc@n @ending from gm@il@com
Wed Oct 17 17:37:52 CEST 2018


On 17/10/2018 11:16 AM, S Ellison wrote:
>> 2.  change cfun[[1]] <- quote(cord.work) to cfun[[1]] <-
>> quote(survival:::cord.work).  You say this will mess up your test bed.
>> That suggests that your test bed is broken.  This is a perfectly legal
>> and valid solution.
> Valid in a package, but forces code to call a loaded library version of a function rather than (say) a 'source'd user-space version that is under development.
> Being non-specific (ie omitting foo:::) means that test code would pick up the development version in the current user environment by default. That's handy for small mods.

I generally rebuild a package after each change.  In RStudio that's 
pretty simple:  "Install and Restart" saves the current workspace, shuts 
down R, installs the revised package, and restarts R with the old 
workspace.  It's all pretty quick.

Duncan Murdoch



More information about the R-devel mailing list