From ggrothendieck at gmail.com  Sun Nov  2 15:33:51 2008
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Sun, 2 Nov 2008 09:33:51 -0500
Subject: [Rd] Wishlist: pass args from demo() to source()
Message-ID: <971536df0811020633u13116fc0x50550cda3c1285b6@mail.gmail.com>

Currently demo calls source with a hard coded max.deparse.length = 250
so you can't really see the demo properly in some cases.  Note the
[TRUNCATED] below.  (1) It would be nice if demo passed max.deparse.length
(and other args to source).  (2) Also a larger max.deparse.length default would
be nice to make it less likely one would have to set it in the first place.

> R.version.string # Vista
[1] "R version 2.8.0 Patched (2008-10-21 r46766)"
> demo("gsubfn-si")


        demo(gsubfn-si)
        ---- ~~~~~~~~~

Type  <Return>   to start :

> # given number possibly followed by SI letter (e.g. 32.5k where k means 1000)
> # replace letter with e followed by appropriate digits.
> # (see formatEng2R by Hans-Joerg Bibiko in the R Wiki)
>
> conv <- list(y = "e-24", z = "e-21", a = "e-18", f .... [TRUNCATED]

> gsubfn(".$", conv, c("19", "32.5M"))
[1] "19"     "32.5e6"



[Rd] Wishlist: pass args from demo() to source()
Gabor Grothendieck