[rkward-devel] as.list wrong behaviour

Eduardo de Oliveira Horta eduardo.oliveirahorta at gmail.com
Tue Jan 4 16:32:03 UTC 2011


Thanks!

On Tue, Jan 4, 2011 at 2:13 PM, Thomas Friedrichsmeier <
thomas.friedrichsmeier at ruhr-uni-bochum.de> wrote:

> Hi,
>
> On Tuesday 04 January 2011, Eduardo de Oliveira Horta wrote:
> > > B = 1000
> > > oblist = as.list(.GlobalEnv)
>
> the problem appears to be our use of "active bindings" (see
> ?makeActiveBinding). Internally, RKWard replaces all objects inside
> .GlobalEnv
> by active bindings. This allows us to find out, when the objects get
> modified.
> For almost all purposes, these active bindings behave just like the regular
> object, but apparently, as.list() copies the accessor functions, instead. I
> do
> wonder whether that is the expected behavior of as.list()...
>
> Either way, RKWard will probably switch to a different strategy for
> detecting
> when objects get modified, in the not-too-distant future. The problem
> should go
> away, then. Meanwhile, perhaps you can work around the problem using code
> like
> this:
>
> oblist <- sapply (ls (all.names=TRUE), function (x) get (x),
> simplify=FALSE)
>
> Regards
> Thomas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20110104/0c1b0ac1/attachment.html>


More information about the Rkward-devel mailing list