rdefault-valuedefaults

Setting Function Defaults R on a Project Specific Basis


Commonly, I use the same function settings. I'm wondering if there is a method, other than having a new object in the path that is essentially a wrapper for the function, to set default arguments. For example:

paste() has it's sep argument set to a space =" ", I'm tired of writing ,sep="" over and over. So is there a way to "temporarily" replace the function with my chosen defaults?

paste(...,sep="") 

Can I accomplish this through packaging? I've sometimes noticed that, some packages force other equally named functions to be masked in the global environment.

Ideally, I'd like something that can be set on a project by project basis in (load.r or some other such workflow startpoint)


Solution

  • The Defaults package used to do that; retired in 2014.