Re: [R] Partial matching with $ extractor.

2023-01-24 Thread Rolf Turner
On Tue, 24 Jan 2023 17:16:44 -0500 Andrew Simmons wrote: > I tried this again with R 2.15.3, the oldest version I have installed, > and I still got the same behaviour. It extracts the first exact match, > then the only partial match, then NULL. Thanks for that. I am *sure* that I had

Re: [R] Partial matching with $ extractor.

2023-01-24 Thread Andrew Simmons
I tried this again with R 2.15.3, the oldest version I have installed, and I still got the same behaviour. It extracts the first exact match, then the only partial match, then NULL. On Tue, Jan 24, 2023 at 5:04 PM Rolf Turner wrote: > > > Has something changed, but I missed it? > > My

Re: [R] Partial matching with $ extractor.

2023-01-24 Thread Andrew Simmons
junk$y extracts the element named "y" because it found an exact match for the name. junk$yu extracts nothing because it does not find an exact match and finds multiple partial matches. junk$yuc or junk$yur would work because it finds no exact match and then exactly one partial match. On Tue,

[R] Partial matching with $ extractor.

2023-01-24 Thread Rolf Turner
Has something changed, but I missed it? My recollection is that $ extraction used partial matching. E.g. if one did junk <- list(yuck=1,yurk=2,y=3) junk$y then one would get 1 as the result; probably *not* the desired result. See fortunes::fortune("toad"). To get the desired result,