Unfortunately, the spammers in question appear to be human (of sorts).
We're not sure what they're up to, but a common pattern is to post random text,
or something copied from a generic bug report (like "able to add 6 item"),
later followed by a comment containing a link or a file attachment.
Dear all,
I have a function "fn" with its own environment, i.e.
env <- environment(fn)
and env is not .GlobalEnv. And another function
getValue <- function(x) environment(x)$mylist
which returns the list object "mylist" which is in "env". If I want to
modify "mylist", I could write
'getVal
On 07/02/2016 8:08 AM, Daniel Kaschek wrote:
Dear all,
I have a function "fn" with its own environment, i.e.
env <- environment(fn)
and env is not .GlobalEnv. And another function
getValue <- function(x) environment(x)$mylist
which returns the list object "mylist" which is in "env". If I wan
> On 07 Feb 2016, at 14:46 , Duncan Murdoch wrot8[e:
>
[snippage]
>
> but in fact, this doesn't work:
>
> getValue(fn)[[1]] <- 3
> Error in getValue(fn)[[1]] <- 3 : could not find function "getValue"
>
> I suspect this is a parser problem.
Umm, no...
The canonical semantics are that
foo(x
On So, Feb 7, 2016 at 2:46 , Duncan Murdoch
wrote:
An assignment function should return the modified value. So it looks
like you would need
'getValue<-' <- function(x, value) {
environment(x)$mylist <- value
x
}
Thanks. I have not thought of a return value. That makes the differen
On 07/02/2016 9:15 AM, peter dalgaard wrote:
On 07 Feb 2016, at 14:46 , Duncan Murdoch wrot8[e:
[snippage]
but in fact, this doesn't work:
getValue(fn)[[1]] <- 3
Error in getValue(fn)[[1]] <- 3 : could not find function "getValue"
I suspect this is a parser problem.
Umm, no...
The can