Last active
August 29, 2015 14:20
-
-
Save ateucher/f6d52d482876bed868fd to your computer and use it in GitHub Desktop.
cowsay errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Makes a random animal deliver the error message | |
## Fun to put in a .Rprofile :) | |
# devtools::install_github("sckott/cowsay") | |
library("cowsay", quietly = TRUE) | |
options(error = function() { | |
animal <- say("", by = "random", type = "string") | |
## remove the top "-------" message delimiter from the cowsay character | |
message(strsplit(animal, "\n\\s*-{5,20}\\s*\n\\s*\n")[[1]][2]) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment