Re: [Rd] n=1 default for random number generators
On 11/16/2009 11:00 AM, Richard Cotton wrote: One tiny thing that would be very nice to have is a default value of n=1 in the random number generator functions, enabling, e.g., runif() instead of runif(1). This won't break anyone's existing code and ought to be relatively straightforward to do. Is there anyone in the core team who would be willing to include this change? I doubt it. Even if you put together the patch (and I didn't see an offer to do so), merging it into the trunk code would take more work than you'd save in several years of typing the 1. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] n=1 default for random number generators
-Original Message- From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On Behalf Of Duncan Murdoch Sent: Monday, November 16, 2009 8:28 AM To: Richard Cotton Cc: r-devel@r-project.org Subject: Re: [Rd] n=1 default for random number generators On 11/16/2009 11:00 AM, Richard Cotton wrote: One tiny thing that would be very nice to have is a default value of n=1 in the random number generator functions, enabling, e.g., runif() instead of runif(1). This won't break anyone's existing code and ought to be relatively straightforward to do. Is there anyone in the core team who would be willing to include this change? I doubt it. Even if you put together the patch (and I didn't see an offer to do so), merging it into the trunk code would take more work than you'd save in several years of typing the 1. Also, you would probably hear complaints that n=1 is not a common value for the argument in 'well-written' (really, vectorized cpu-efficient) R code. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com Duncan Murdoch __ 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
Re: [Rd] n=1 default for random number generators
Duncan Murdoch wrote: On 11/16/2009 11:00 AM, Richard Cotton wrote: One tiny thing that would be very nice to have is a default value of n=1 in the random number generator functions, enabling, e.g., runif() instead of runif(1). This won't break anyone's existing code and ought to be relatively straightforward to do. Is there anyone in the core team who would be willing to include this change? I doubt it. Even if you put together the patch (and I didn't see an offer to do so), merging it into the trunk code would take more work than you'd save in several years of typing the 1. Duncan Murdoch In the spirit of sour grapes, the proposed default might discourage some users from vectorizing their thinking. Patrick Burns patr...@burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of The R Inferno and A Guide for the Unwilling S User) __ 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
Re: [Rd] n=1 default for random number generators
On Mon, 16 Nov 2009, Richard Cotton wrote: One tiny thing that would be very nice to have is a default value of n=1 in the random number generator functions, enabling, e.g., runif() instead of runif(1). This won't break anyone's existing code and ought to be relatively straightforward to do. Is there anyone in the core team who would be willing to include this change? For those in base R (not all are, of course), if someone makes a persuasive case (not just says 'would be very nice to have': e.g. produces statistics of usage by a wide group of users showing that is a commonly used value of 'n') and supplies a complete patch (to the help as well as the code). - Regards, Richie. Mathematical Sciences Unit HSL -- 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