View source: R/TraMineR-check-depr-args.R
TraMineR.check.depr.args | R Documentation |
Checks the presence of deprecated arguments, assigns value of a deprecated argument to the corresponding new argument name, and issues warning messages.
TraMineR.check.depr.args(arg.pairs)
arg.pairs |
List of pairs of old and new argument names
|
To be used inside functions. For developers only.
For each specified pair of new and old argument names, the function checks if the old argument name is specified. If so and the new one is not, a warning message is raised and the argument value is assigned to the new argument name. If one of the names declared in check.depr.args() arguments si not an argument of the parent function or if both the new and old argument names are specified an error is raised.
The function does not detect when the new and the old argument names are specified together and the new argument value is its default value. In this case, the value associated with the old argument name is assigned to the new name and a warning message is raised.
The function works whether the argument names are explicitly declared or not in the call to the checked function.
The only requirement for the function to work is that the deprecated arguments should be listed WITHOUT default values in the definition of the checked function.
None.
Pierre-Alexandre Fonta, Gilbert Ritschard
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.