Re: [Rd] error on uneven recycling?

2012-09-25 Thread Prof Brian Ripley

On 25/09/2012 03:45, Thomas Lumley wrote:

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.


It produces a warning, not an R CMD check warning.  There are lots of 
instances on CRAN, for example when running the examples for


CollocInfer DiceOptim FitAR LaplacesDemon MethComp OUwie ROptEst
RandVar RiDMC SweaveListingUtils TeachingSampling adlift
arulesViz caret cyclones depth disp2D gstat hyperSpec igraph
igraph0 iid influence irtoys isotone ldDesign libamtrack lqmm
mixtools phylobase polynom replicationDemos reporttools robustX
rsem sfsmisc spam spatstat survival tcltk2 tsDyn

let alone tests and vignettes.

--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] error on uneven recycling?

2012-09-25 Thread Prof Brian Ripley

On 25/09/2012 08:12, Prof Brian Ripley wrote:

On 25/09/2012 03:45, Thomas Lumley wrote:

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.


It produces a warning, not an R CMD check warning.  There are lots of
instances on CRAN, for example when running the examples for

CollocInfer DiceOptim FitAR LaplacesDemon MethComp OUwie ROptEst
RandVar RiDMC SweaveListingUtils TeachingSampling adlift
arulesViz caret cyclones depth disp2D gstat hyperSpec igraph
igraph0 iid influence irtoys isotone ldDesign libamtrack lqmm
mixtools phylobase polynom replicationDemos reporttools robustX
rsem sfsmisc spam spatstat survival tcltk2 tsDyn

let alone tests and vignettes.


I caught some some similar ones in that search:

CollocInfer DiceOptim RandVar TeachingSampling hyperSpec igraph igraph0 
influence lqmm mixtool phylobase polynom robustX sfsmisc spam survival 
tcltk2 tsDyn


are exactly that warning.  I think for example the one in 'survival' is 
an error.


--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] error on uneven recycling?

2012-09-25 Thread peter dalgaard

On Sep 25, 2012, at 04:45 , Thomas Lumley wrote:

 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

I always thought it was retained in case you needed to add something with 
cyclic behavior to a time series not necessarily containing an even number of 
cycles. If it has been outlawed in S-PLUS for a decade, that's probably not a 
big need...

-p

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] error on uneven recycling?

2012-09-24 Thread William Dunlap
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-boun...@r-project.org [mailto:r-devel-boun...@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@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel