.Deprecated
Mark Functions as Deprecated, Defunct, or Not Yet Implemented

Description

Warns when a function is due to be removed, has been removed, or is not yet added.

Usage

.Deprecated(new, package = NULL, msg, old = as.character(sys.call(sys.parent()))[1L]) 
.Defunct(new, package = NULL, msg)
.NotYetImplemented()

Arguments

new a character string. The name of a suggested replacement function.
package a charactered string. The name of the package where help("package-deprecated") or help("package-defunct") conveys information on how to replace the old function with the new function.
msg arbitrary arguments that are pasted together to form a message.
old a character string. The name of the deprecated function. If not specified, the value of sys.call(sys.parent)) is used.

Details

These functions are meant for package authors.
Both .Deprecated and .Defunct should provide information recommending a replacement function or refer to a help file that provides an alternative function.
Use .NotYetImplemented for a function that is not yet available but that you plan to implement.
Value
.Deprecated returns the text of the warning message it makes. .Defunct and .NotYetImplemented call stop and hence return nothing.
See Also
warning, options.
Examples
oldFun <- function(x)
{
        .Deprecated(new = "newFun")
        sum(log(x))
}
olderFun <- function(x)
{
        .Defunct(new = "newFun")
}
newFun <- function(x)
{
        .NotYetImplemented()
}
## Not run: 
oldFun(1:3)
olderFun(1:3)
newFun(1:3)

## End(Not run)
Package base version 6.1.1-7
Package Index