>>>>> "Spencer" == Spencer Graves <[EMAIL PROTECTED]>
>>>>>     on Tue, 16 Sep 2003 19:54:22 -0700 writes:

    Spencer> Consider
    Spencer>  Q <- function(x)q("no")

    Spencer> With R 1.7.1 under Windows, "Q()" caused R to close
    Spencer> without asking for confirmation.  This does not
    Spencer> solve the whole problem, but it might provide a
    Spencer> piece of the puzzle.

Apropos, this reminds me of the old quiz (from the S-plus times):

How can you write (quite short!) R code such that
typing
        "Q"   

-- without any  "()" -- will quit R (without asking about saving).

[But you shouldn't really keep that code active in your standard R session
 because it would be too easy to accidentally shut down R !]

For the advanced ones: 
My shortest solution uses 51 characters of R code, can you beat that?

-- 
Martin Maechler <[EMAIL PROTECTED]>     http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16    Leonhardstr. 27
ETH (Federal Inst. Technology)  8092 Zurich     SWITZERLAND
phone: x-41-1-632-3408          fax: ...-1228                   <><

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to