From phgrosjean at sciviews.org  Tue Nov  3 10:48:23 2009
From: phgrosjean at sciviews.org (Philippe Grosjean)
Date: Tue, 03 Nov 2009 10:48:23 +0100
Subject: [Rd] Strange code in `?`
Message-ID: <4AEFFC67.7070206@sciviews.org>

Hello,

In R 2.10, looking at:

 > `?`
function (e1, e2)
{
     if (missing(e2)) {
         type <- NULL
         topicExpr <- substitute(e1)
     }
     else {
         type <- substitute(e1)
         topicExpr <- substitute(e2)
     }
     if (is.call(topicExpr) && topicExpr[[1L]] == "?") {
         search <- TRUE
         topicExpr <- topicExpr[[2L]]
         if (is.call(topicExpr) && topicExpr[[1L]] == "?" && 
is.call(topicExpr[[2L]]) &&
             topicExpr[[2L]][[1L]] == "?") {
             cat("Contacting Delphi...")
             flush.console()
             Sys.sleep(2 + rpois(1, 2))
             cat("the oracle is unavailable.\nWe apologize for any 
inconvenience.\n")
             return(invisible())
         }
     }

[...]

I am especially puzzled by this part:

cat("Contacting Delphi...")
flush.console()
Sys.sleep(2 + rpois(1, 2))
cat("the oracle is unavailable.\nWe apologize for any inconvenience.\n")

We now got jokes in R code? Why not? ;-)
Best,

Philippe
-- 
..............................................<?}))><........
  ) ) ) ) )
( ( ( ( (    Prof. Philippe Grosjean
  ) ) ) ) )
( ( ( ( (    Numerical Ecology of Aquatic Systems
  ) ) ) ) )   Mons University, Belgium
( ( ( ( (
..............................................................



[Rd] Strange code in `?`
Philippe Grosjean