Re: [Rd] Multiple Assignment built into the R Interpreter?

2023-03-12 Thread Pavel Krivitsky
Dear All, As a maintainer of large, complex packages, I can think of many places in which deconstructing assignment would simplify the code, as well as facilitate readability by breaking up larger functions into helpers, so I would be very glad to see this incorporated somehow. I think the crux

Re: [R-pkg-devel] First CRAN submission - quick feedback

2023-03-12 Thread Zhian Kamvar
Generally you will want to use an application directory for storing these files (a la rappdirs) and, importantly, allow the user to consent to these files being downloaded and installed, which should not be done on load. On Sun, Mar 12, 2023 at 13:24 Ronald Bergmann wrote: > Hi

[R-pkg-devel] First CRAN submission - quick feedback

2023-03-12 Thread Ronald Bergmann
Hi r-package-devel, we'll soon make our first submission to CRAN (hopefully). While there's still stuff to do* and while we're waiting for an update to one of the dependencies I'd kindly like to ask if anyone would mind taking a quick look at the repository to assess if the overall structure

Re: [R-pkg-devel] Tools for reducing dependencies?

2023-03-12 Thread Joshua Ulrich
Hi Duncan, On Sun, Mar 12, 2023 at 6:34 AM Duncan Murdoch wrote: > > The rgl package has a really large number of dependencies, especially if > I include soft (Suggested) dependencies. It would be nice to reduce > that number. > > To do that, I can imagine a tool that gives the following

Re: [Rd] Multiple Assignment built into the R Interpreter?

2023-03-12 Thread Sebastian Martin Krantz
Kevins package is very nice as a proof of concept, no doubt about that, but it is not at the level of performance or convenience that a native R implementation would offer. I would probably not use it to translate matlab routines into R packages placed on CRAN, because it’s an additional

Re: [Rd] Multiple Assignment built into the R Interpreter?

2023-03-12 Thread Sebastian Martin Krantz
Thinking more about this, and seeing Kevins examples at https://github.com/kevinushey/dotty, I think this is the most R-like way of doing it, with an additional benefit as it would allow to introduce the useful data.table semantics DT[, .(a = b, c, d)] to more general R. So I would propose to

Re: [Rd] Multiple Assignment built into the R Interpreter?

2023-03-12 Thread Sebastian Martin Krantz
Thanks Gabriel and Kevin for your inputs, regarding your points Gabriel, I think Python and Julia do allow multiple sub-assignment, but in-line with my earlier suggestion in response to Duncan to make multiple assignment an environment-level operation (like collapse::%=% currently works), this

[R-pkg-devel] Tools for reducing dependencies?

2023-03-12 Thread Duncan Murdoch
The rgl package has a really large number of dependencies, especially if I include soft (Suggested) dependencies. It would be nice to reduce that number. To do that, I can imagine a tool that gives the following information: - For each export from rgl, which dependencies are needed? - For

Re: [Rd] Multiple Assignment built into the R Interpreter?

2023-03-12 Thread Duncan Murdoch
On 12/03/2023 6:07 a.m., Sebastian Martin Krantz wrote: Thinking more about this, and seeing Kevins examples at https://github.com/kevinushey/dotty , I think this is the most R-like way of doing it, with an additional benefit as it would allow to introduce

Re: [Rd] Multiple Assignment built into the R Interpreter?

2023-03-12 Thread Duncan Murdoch
I really like it! Nicely done. Duncan Murdoch On 11/03/2023 6:00 p.m., Kevin Ushey wrote: FWIW, it's possible to get fairly close to your proposed semantics using the existing metaprogramming facilities in R. I put together a prototype package here to demonstrate: