[R] package:Matrix handling of data with identical indices
    roger koenker 
    roger at ysidro.econ.uiuc.edu
       
    Sun Jul  9 19:31:16 CEST 2006
    
    
  
>
On 7/8/06, Thaden, John J <ThadenJohnJ at uams.edu> wrote:
> As there is nothing inherent in either compressed, sparse,
> format that would prevent recognition and handling of
> duplicated index pairs, I'm curious why the dgCMatrix
> class doesn't also add x values in those instances?
why not multiply them?  or take the larger one, or ...?  I would
interpret this as a case of user negligence -- there is no
"natural" default behavior for such cases.
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.
Elaborating the validity procedure to flag such instances seems
to be well worth the  speed penalty in my view.  Of course,
anticipating every such misstep imposes a heavy burden
on developers and constitutes the real "cost" of more elaborate
validity checking.
[My 2cents based on experience with SparseM.]
url:    www.econ.uiuc.edu/~roger                Roger Koenker
email   rkoenker at uiuc.edu                       Department of Economics
vox:    217-333-4558                            University of Illinois
fax:    217-244-6678                            Champaign, IL 61820
    
    
More information about the R-help
mailing list