search for: alternativeassignment

Displaying 3 results from an estimated 3 matches for "alternativeassignment".

2023 Mar 13
1
Multiple Assignment built into the R Interpreter?
Yes, this is really a problem with the checks, not with the language. A simpler approach than your alternativeAssignment function would be simply to allow globalVariables() to be limited to a single function as the note in its help page says. This might be tedious to write by hand, but could be automated using methods like "dotify" in dotty. Duncan Murdoch On 12/03/2023 10:36 p.m., Pavel Krivitsky wr...
2023 Mar 13
1
Multiple Assignment built into the R Interpreter?
...essed in 'codetools', with a finer API than what utils::globalVariables() provides.?Perhaps this would have a lower hurdle than modifying R language itself? From skimming through the relevant 'codetools' code, one idea for such an API would be a function, along the lines of utils::alternativeAssignment(op, assigned) that sets up a callback assigned = function(op, e) that given the operator (as string) and the expression it's embedded in, returns a list of three elements: * a character vector containing a list of variables assigned to that might not otherwise be detected * a character ve...
2023 Mar 12
1
Multiple Assignment built into the R Interpreter?
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 dependency, I have a performance burden in every iteration, and utils::globalVariables() is everything but