You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
388 B

berate <- function(err) {
if (stats::runif(1) < 0.1) { return(invisible()) }
msg <- tryCatch(html_text(html_nodes(read_html("http://www.programmerinsults.com/"), "h1")),
error=function(err) { return("\\_(o_O)_/") })
cat(msg)
}
.onAttach <- function(libname, pkgname) {
options(error=berate)
}
.onLoad <- function(libname, pkgname) {
options(error=berate)
}