From wdunlap at tibco.com  Tue Sep 25 07:15:14 2012
From: wdunlap at tibco.com (William Dunlap)
Date: Tue, 25 Sep 2012 05:15:14 +0000
Subject: [Rd] error on uneven recycling?
In-Reply-To: <CAJ55+dJ8zbqK-7RvTO-8K-y=e1BMKG8aHm-HML3F+FQm1EfutA@mail.gmail.com>
References: <CAJ55+dJ8zbqK-7RvTO-8K-y=e1BMKG8aHm-HML3F+FQm1EfutA@mail.gmail.com>
Message-ID: <E66794E69CFDE04D9A70842786030B93342B40@PA-MBX04.na.tibco.com>

That is an error in Splus 8.3.  It must have changed quite a while
ago - it was an error in Splus 5.1, released in 1999 and I don't have
an older version handy right now.  Current behavior is
> 1:10 + 0:1
 [1]  1  3  3  5  5  7  7  9  9 11
> 1:10 + 0:2
Problem in 1:10 + 0:2: length of longer operand (10) should be a multiple of length of shorter (3)
Use traceback() to see the call stack

I vaguley recall running into some problems when we made the change,
but I think it was only in our internal test suite, using a trick like the above
to produce a patterned sequence.

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com


> -----Original Message-----
> From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-project.org] On Behalf
> Of Thomas Lumley
> Sent: Monday, September 24, 2012 7:45 PM
> To: R-devel
> Subject: [Rd] error on uneven recycling?
> 
> Is there some reason why
> 
> > (1:2)+(1:3)
> [1] 2 4 4
> Warning message:
> In (1:2) + (1:3) :
>   longer object length is not a multiple of shorter object length
> 
> can't be made into an error?  I realise it was there in S-PLUS, but
> since it produces a warning there can't be many examples on CRAN or
> Bioconductor using it, and I can't think of any situation where it
> would be used deliberately.
> 
>     -thomas
> 
> --
> Thomas Lumley
> Professor of Biostatistics
> University of Auckland
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] error on uneven recycling?
William Dunlap