# NOT RUN {
testit <- function(){
warning("this function does nothing.")
warning("it's pretty useless.")
}
suppress_warning(testit(), "useless") # Will suppress only the second warning by pattern
# If my_pkg used pkgcond for conditions,
# This would suppress all messages and warnings originating
# in my_pkg functions.
suppress_conditions(my_function(), class='my_pkg-condition')
# }
Run the code above in your browser using DataLab