From maechler at stat.math.ethz.ch  Wed Sep  6 09:27:44 2006
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Wed, 6 Sep 2006 09:27:44 +0200
Subject: [Rd] (PR#9202) Re: Bugs with partial name matching
In-Reply-To: <69C0202D-ED5A-495A-9F38-FD2F7F132C29@uic.edu>
References: <20060905014002.634C928F8E@slim.kubism.ku.dk>
	<Pine.LNX.4.64.0609051507530.17674@homer23.u.washington.edu>
	<Pine.LNX.4.64.0609051542310.17674@homer23.u.washington.edu>
	<69C0202D-ED5A-495A-9F38-FD2F7F132C29@uic.edu>
Message-ID: <17662.30832.422990.781097@stat.math.ethz.ch>

>>>>> "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




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