R
This is technically not an error but a warning but nevertheless it's ridiculous, and occurs for completely esoteric reasons.
[[EDIT]] It seems that the cause of some parts of the funny warnings resides in RStudio rather than R per se, so it's less interesting than I first thought. The first example i.e plot(1:2, NotAGraphicalParameter = "ignore.me") is, however, still reproducible in "naked" R and is funny enough on its own right.[[/EDIT]]
> plot(1:2, NotAGraphicalParameter = "ignore.me") # produces a nice scatterplot with two points, [1,1] and [2,2] Warning messages: 1: In plot.window(...) : "NotAGraphicalParameter" is not a graphical parameter 2: In plot.xy(xy, type, ...) : "NotAGraphicalParameter" is not a graphical parameter 3: In axis(side = side, at = at, labels = labels, ...) : "NotAGraphicalParameter" is not a graphical parameter 4: In axis(side = side, at = at, labels = labels, ...) : "NotAGraphicalParameter" is not a graphical parameter 5: In box(...) : "NotAGraphicalParameter" is not a graphical parameter 6: In title(...) : "NotAGraphicalParameter" is not a graphical parameter > plot(2:3) # another nice scatterplot: [2,2] and [3,3] # but there should be nothing wrong this time! # however ... There were 12 warnings (use warnings() to see them) > warnings() Warning messages: 1: "NotAGraphicalParameter" is not a graphical parameter 2: "NotAGraphicalParameter" is not a graphical parameter 3: "NotAGraphicalParameter" is not a graphical parameter 4: "NotAGraphicalParameter" is not a graphical parameter 5: "NotAGraphicalParameter" is not a graphical parameter 6: "NotAGraphicalParameter" is not a graphical parameter 7: "NotAGraphicalParameter" is not a graphical parameter 8: "NotAGraphicalParameter" is not a graphical parameter 9: "NotAGraphicalParameter" is not a graphical parameter 10: "NotAGraphicalParameter" is not a graphical parameter 11: "NotAGraphicalParameter" is not a graphical parameter 12: "NotAGraphicalParameter" is not a graphical parameter # but let's try once more: > plot(2:3) # yup. no warnings this time. we had to do it twice
It's like R remembers our insults. But not for long.
I can't really explain why this happens - but it is reproducible. Actually it occurs every time when you supply some "not a graphical parameter" to plot 1, and then do a plot 2 in a completely impeccable way. It is especially funny that we get 12 "not a graphical parameter" warnings for the second plot but only 6 for the first one. Another funny thing is that if you supply "not a graphical parameter" with a value NULL then no condition is thrown:
plot(1:2, Nonsense=NULL) # no warnings # however plot(1:2, Nonsense="gibberish") # gives the usual 6-pack of warnings
And to get even more ridiculous, let's draw some lines on top of the previously drawn plot:
plot(1:2) # you will see the number of warnings growing with each line: lines(1:2, 1:2, mumbo = 1) lines(1:2, 1:2, jumbo = 2) lines(1:2, 1:2, bimbo = 3) lines(1:2, 1:2, cucaracha = 4) lines(1:2, 1:2, karaoke = 5) lines(1:2, 1:2, radiogaga = 6) lines(1:2, 1:2, reptiles = 7) lines(1:2, 1:2, cowsonmoon = 8) lines(1:2, 1:2, stainlessSteelLadderToTheMoon = 9) lines(1:2, 1:2, frambuesa = 10) lines(1:2, 1:2, fresa = 11) lines(1:2, 1:2, limonYNada = 12) lines(1:2, 1:2, slingsAndArrows = 13) # ... and now you have 25 warnings: warnings() Warning messages: 1: "mumbo" is not a graphical parameter 2: "jumbo" is not a graphical parameter 3: "bimbo" is not a graphical parameter 4: "cucaracha" is not a graphical parameter 5: "karaoke" is not a graphical parameter 6: "radiogaga" is not a graphical parameter 7: "reptiles" is not a graphical parameter 8: "cowsonmoon" is not a graphical parameter 9: "stainlessSteelLadderToTheMoon" is not a graphical parameter 10: "frambuesa" is not a graphical parameter 11: "fresa" is not a graphical parameter 12: "limonYNada" is not a graphical parameter 13: "mumbo" is not a graphical parameter 14: "jumbo" is not a graphical parameter 15: "bimbo" is not a graphical parameter 16: "cucaracha" is not a graphical parameter 17: "karaoke" is not a graphical parameter 18: "radiogaga" is not a graphical parameter 19: "reptiles" is not a graphical parameter 20: "cowsonmoon" is not a graphical parameter 21: "stainlessSteelLadderToTheMoon" is not a graphical parameter 22: "frambuesa" is not a graphical parameter 23: "fresa" is not a graphical parameter 24: "limonYNada" is not a graphical parameter 25: In plot.xy(xy.coords(x, y), type = type, ...) : "slingsAndArrows" is not a graphical parameter
This should not win big time unless there is no justice.
import sys; sys.setrecursionlimit(~-2**31); x=lambda x:x(x); x(x);\$\endgroup\$