[Rd] Suggest adding a 'pivot' argument to qr.R

peter dalgaard pdalgd at gmail.com
Tue Sep 11 18:03:53 CEST 2012


On Sep 11, 2012, at 16:02 , Warnes, Gregory wrote:

> 
> On 9/7/12 2:42 PM, "peter dalgaard" <pdalgd at gmail.com> wrote:
> 
>> 
>> On Sep 7, 2012, at 17:16 , Tim Hesterberg wrote:
>> 
>>> I suggest adding a 'pivot' argument to qr.R, to obtain columns in the
>>> same order as the original x, so that
>>> a <- qr(x)
>>> qr.Q(a) %*% qr.R(a, pivot=TRUE)
>>> returns x.
>> 
>> That would come spiraling down in flames the first time someone tried to
>> use backsolve on it, wouldn't it? I mean, a major point of QR is that R
>> is triangular; doesn't make much sense to permute the columns without
>> retaining the pivoting permutation.
> 
> As I understand Tim's proposal, the pivot argument defaults to FALSE, so
> the new behavior would only be activated at the user's request.

Sure. I'm just saying that I see little use for the un-pivoted qr.R because, generically, the first thing you want to do with qr.R is to invert it, which is easier when it is triangular.

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



More information about the R-devel mailing list