Future proofing the mxRun() function

mxRun(model, flag1 = value1, flag2 = value2, flag3 = etc.)
.
The proposal is to change the signature to:
mxRun(model, ..., flag1 = value1, flag2 = value2, flag3 = etc.)
The '...' arguments would not be used by the function. The purpose of the '...' arguments is to force any remaining arguments to be specified as named arguments. This will go a long way to ensure that future scripts will continue to run as new arguments are added to the 'mxRun' command. If any values are passed into the '...' arguments, then an error will be thrown. The R documentation for 'mxRun' will make it clear that the '...' argument is unused.
The alternative is to continue adding flags to 'mxRun' with default values, but new flags will always be added to the end of the function call. Adding new flags to the end of the call is consistent, but that prohibits the flags to be grouped according to their functionality (they are always sorted by date).
The proposal seems very
Log in or register to post comments
In reply to The proposal seems very by Steve
Yes, to me too. Very
Log in or register to post comments