if (FALSE) {
options(warn=1) # Print warning immediately after the call.
f <- function(){
.Deprecate_once("new_f")
}
f() # Deprecation warning
f() # No deprecation warning
}
if (FALSE) {
options(warn=1) # Print warning immediately after the call.
summary.packageDescription <- function(object, ...){
.Deprecate_method("summary", "packageDescription")
invisible(object)
}
summary(packageDescription("statnet.common")) # No warning.
summary.packageDescription(packageDescription("statnet.common")) # Warning.
summary.packageDescription(packageDescription("statnet.common")) # No warning.
}
Run the code above in your browser using DataLab