From wdunlap at tibco.com  Fri Apr 17 16:49:04 2015
From: wdunlap at tibco.com (William Dunlap)
Date: Fri, 17 Apr 2015 07:49:04 -0700
Subject: [Rd] Redefining {
In-Reply-To: <553089C2.8040309@oracle.com>
References: <553089C2.8040309@oracle.com>
Message-ID: <CAF8bMca2y9X6XhFGYHaX8KrR6d1Z8cEN_OgOiOcLJyspTQz8mA@mail.gmail.com>

One could redefine the "{" function with something like
    `{` <- function(...) simplify2array(list(...))
but then you would have to live with the syntax it requires
(semicolons for separators instead of commas)
   > {1; 2; 3}
   [1] 1 2 3
   > {{11;12;13}; {21;22;23}; {31;32;33}}
        [,1] [,2] [,3]
   [1,]   11   21   31
   [2,]   12   22   32
   [3,]   13   23   33

I have not seen this in any "real" code.


Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Thu, Apr 16, 2015 at 9:19 PM, Mick Jordan <mick.jordan at oracle.com> wrote:

> I am curious if anyone knows of R code where the "{" function is redefined
> in a useful way. Or "(" for that matter.
>
> Thanks
> Mick
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]



[Rd] Redefining {
William Dunlap