Re: [R] package:Matrix handling of data with identical indices

From: Martin Maechler <maechler_at_stat.math.ethz.ch>
Date: Mon 10 Jul 2006 - 23:58:38 EST

>>>>> "roger" == roger koenker <roger@ysidro.econ.uiuc.edu> >>>>> on Sun, 9 Jul 2006 12:31:16 -0500 writes:

    roger> On Jul 9, 2006, at 11:06 AM, Douglas Bates wrote:

>> Your matrix Mc should be flagged as invalid. Martin and
>> I should discuss whether we want to add such a test to
>> the validity method. It is not difficult to add the test
>> but there will be a penalty in that it will slow down all
>> operations on such matrices and I'm not sure if we want
>> to pay that price to catch a rather infrequently occuring
>> problem.

    roger> Elaborating the validity procedure to flag such
    roger> instances seems to be well worth the speed penalty in
    roger> my view.  Of course, anticipating every such misstep
    roger> imposes a heavy burden on developers and constitutes
    roger> the real "cost" of more elaborate validity checking.

As I found, we already *have* a validate_dgCMatrix in C code, and adding an improved test for the validity of the 'p' slot, solves ``all problems'' mentioned above --- without any performance penalty.
Hence., in the upcoming next version of 'Matrix' (0.95-12), John will get a proper error message immediately from calling new(...) with the wrong 'p' (or 'Dim').

Martin

    roger> [My 2cents based on experience with SparseM.]

    roger> url: www.econ.uiuc.edu/~roger Roger Koenker email
    roger> rkoenker@uiuc.edu Department of Economics vox:
    roger> 217-333-4558 University of Illinois fax: 217-244-6678
    roger> Champaign, IL 61820

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jul 11 01:00:41 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 11 Jul 2006 - 02:15:53 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.