[Rd] (PR#9202) Re: Bugs with partial name matching

Martin Maechler maechler at stat.math.ethz.ch
Wed Sep 6 09:27:44 CEST 2006


>>>>> "Anil" == Anil Maliyekkel <amaliy1 at uic.edu>
>>>>>     on Tue, 5 Sep 2006 22:50:30 -0500 writes:

 [...................]
 [...................]

    Anil> Going back to the original partial replacement
    Anil> problem, is there anyway to turn off partial matching,

One way would be to use S4 classes (and '@') instead of lists
(and '$'). 
That has other advantages  {?validObject; methods,..}, but also can be
a drawback to you since you need to know in advance
what "components" (called "slots" for S4 objects) your object
will be allowed to contain.

    Anil> or to selectively apply exact matching when trying to
    Anil> access a single element?  I can get the desired single
    Anil> element match using the convoluted syntax D["ABC"]
    Anil> [[1]] and perform partial replacement operations on a
    Anil> new column.  However, it would be nice to have single
    Anil> element access operator that does exact matching.

    Anil> Anil




More information about the R-devel mailing list