Hi,
Agreed that it would be better if sys.call() were to return "x" instead of
"*tmp*", as it behaves as a local variable. Although I'm not sure what problem
it would solve, the effect here is comparable to what happens when calling a
function indirectly (although then you could use sys.call(2)
It seems that exists accepts character vectors of lengths other than
one, but discards all but the first element without an error or
warning. Is this intended? The name "exists" is in the singular, so
it's not surprising that it only contemplates the length-one instance
but in the absence of an e
On 14/10/2018 8:19 PM, Abs Spurdle wrote:
Kia Ora
Let's say we have:
"myreplacementfunction<-" = function (..., value)
{ call = sys.call ()
print (as.list (call) )
0
}
Then we call:
x = 0
myreplacementfunction (x, y, z) = 0
It will return:
[[1]]
`myreplacementfunction<-`
Kia Ora
> Although I'm not sure what problem it would solve...
Given that you asked, I was interested in writing a multiple assignment
function as a replacement function, so something like:
massign (x, y, z) = construct.some list ()
Obviously, that's not possible.
Probably the best example I ca
Seems like there are at least two packages for multiple assignment,
maybe one of them solves your needs, zeallot and dub.
https://r-pkg.org/search.html?q=multiple+assignment
Gabor
On Tue, Oct 16, 2018 at 12:03 AM Abs Spurdle wrote:
>
> Kia Ora
>
> > Although I'm not sure what problem it would so