From deep@y@n@@@rk@r @end|ng |rom gm@||@com  Mon Apr  3 06:07:09 2023
From: deep@y@n@@@rk@r @end|ng |rom gm@||@com (Deepayan Sarkar)
Date: Mon, 3 Apr 2023 09:37:09 +0530
Subject: [Rd] Autocompletion for the new S3 generic @ method?
In-Reply-To: <1F47AC51-9E95-495D-9D54-49057289ACC4@gmail.com>
References: <AEF74F63-9E94-4130-B4B4-9D2CD0C3D468@gmail.com>
 <1F47AC51-9E95-495D-9D54-49057289ACC4@gmail.com>
Message-ID: <CADfFDC7k2pKxBtx6aLzL=VZa96jGtt8jvJ8dmOU=0YCZD9d97Q@mail.gmail.com>

Thanks, we are discussing the details, but we will definitely add
something along those lines before 4.3.0 is released.

Best,
-Deepayan

On Sun, Apr 2, 2023 at 6:39?PM Tomasz Kalinowski <kalinowskit at gmail.com> wrote:
>
> I agree, this is a good idea and would be very helpful in interactive contexts.
>
> I have a draft patch implementing this feature here: https://github.com/r-devel/r-svn/pull/122
> (Append  ?.patch? to the URL to get a raw patch.)
>
> Regards,
> Tomasz
>
> > On Mar 31, 2023, at 2:11 PM, Karolis K <karolis.koncevicius at gmail.com> wrote:
> >
> > Hello,
> >
> > In the current R-devel @ is S3 generic, so we can do things like - for example - use it to extract matrix rows by name:
> >
> >    .S3method("@", "mm", function(object, name) object[name,])
> >    m <- structure(matrix(rnorm(20), ncol=2), dimnames=list(paste0("row", 1:10), paste("col", 1:2)), class="mm")
> >
> >    m at row1
> >
> > However, seems like currently it does not support autocompletion.
> >
> > Wouldn?t it make sense to add a method like .EtaNames() which would provide tab autocompletions for x@<tab> in the same way current .DollarNames() does for x$<tab>?
> >
> > Regards,
> > Karolis K.
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Autocompletion for the new S3 generic @ method?
Deepayan Sarkar