Skip to content

Instantly share code, notes, and snippets.

@mdsumner
Last active September 16, 2022 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdsumner/8962222440cc9922df91eb6288dd81c0 to your computer and use it in GitHub Desktop.
Save mdsumner/8962222440cc9922df91eb6288dd81c0 to your computer and use it in GitHub Desktop.

here's the content of a SO deletion by a sanctimonius obstructionist.

I think I've seen an Easter egg or two in some R packages, but I am not able to recall them.

Here are a few from Matlab, and more here, if you want to see some examples of Easter eggs.

Are there any known Easter eggs in R or some of the major packages?

(If justification is really necessary...the reason for asking is simple: some of the Easter eggs for Matlab demonstrate useful functionality and happen to be amusing. I'm not particularly enamored with their "default image" Easter egg, but the examples for simulations (e.g. life and toilet) are actually useful for code and pedagogical purposes. Not all demos need to be dry.)

Update 1: I apologize to any developers offended by this, but my interest is in widely distributed R packages, as it's not that hard to create an Easter egg and drop the package into CRAN. While examples like this "fried eggs" plot and this bunny are a bit amusing, they're not in particularly common packages, as far as I'm aware. However, finding that fried eggs plot did introduce me to the PBSmodelling package which looks rather helpful for other reasons. (RseekAndYouShallFind...some odd stuff.)

Update 2: example(readline) is iffy. It's the closest I found in a scan of the base R code.

@mdsumner
Copy link
Author

Henrik

This answer is hidden. This answer was deleted 8 years ago along with its parent question.
Try a search, not with ? or ?? but with ???? (or more ?:s),e.g. ????"t.test".

[Share](https://stackoverflow.com/a/9483354/355270)
[Edit](https://stackoverflow.com/posts/9483354/edit)
Follow
Undelete
Flag
answered Feb 28, 2012 at 14:04
[Henrik R](https://stackoverflow.com/users/1238042/henrik-r)'s user avatar
Henrik R
20122 silver badges2
Ha ha ha ha! That's good. – 
[Iterator](https://stackoverflow.com/users/805808/iterator)
 [Feb 28, 2012 at 19:59](https://stackoverflow.com/questions/7910270/are-there-any-easter-eggs-in-base-r-or-in-major-packages#comment12011256_9483354) 

Yes, indeed that is good. – 
[wahalulu](https://stackoverflow.com/users/142068/wahalulu)
 [Apr 13, 2012 at 17:43](https://stackoverflow.com/questions/7910270/are-there-any-easter-eggs-in-base-r-or-in-major-packages#comment13009437_9483354)

I spent a while searching for the source code for this. It can be viewed by typing utils::"?" in the console – 
[Flounderer](https://stackoverflow.com/users/1713297/flounderer)
 [May 24, 2013 at 2:18](https://stackoverflow.com/questions/7910270/are-there-any-easter-eggs-in-base-r-or-in-major-packages#comment24085436_9483354)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment