hi all -- this might not be the correct list for this
question/discussion, though R-help didn't seem like the correct venue,
either, so...
i'm looking for just some extra clarification of how local variables
are defined/bound, beyond the simple cases given in the Language
document.
the particular
ah, that makes perfect sense in the functional programming sense of things.
thanks!
On Wed, Aug 14, 2013 at 10:19 PM, Peter Meilstrup
wrote:
> Not anything that complicated -- your answer is in the R language definition
> under 'Subset assignment' and the part in "Function calls" that describes
>
Hi all, I have a question about finalizers...
I have a package that manages state for a few connections, and I'd
like to ensure that these connections are 'cleanly' closed upon either
(i) R quitting or (ii) an unloading of the package.
So, in a pared-down example package with a single R file, it lo
})
> #> NULL
> rm(e)
> gc()
> #> [1] "bar" "foo"
> #> used (Mb) gc trigger (Mb) max used (Mb)
> #> Ncells 1528877 81.72564037 137.0 2564037 137.0
> #> Vcells 3752538 28.7 7930384 60.6 7930356 60.6
>
> More pr
what happens if you set the finalizer on such an
> object in the package. I can imagine that the finalizer will not be
> saved into the package, and is only used once, when
> building/installing the package. In this case you'll need to set the
> finalizer in .onLoad().
>
> Gabor
6, 2014 11:03 PM, "Henrik Bengtsson" wrote:
> On Sun, Oct 26, 2014 at 8:14 PM, Murat Tasan wrote:
> > Ah (again)!
> > Even with my fumbling presentation of the issue, you gave me the hint
> > that solved it, thanks!
> >
> > Yes, the reg.finalizer cal
n
the state variable container(s), which might not be the most elegant
solution, but it should work well enough for most purposes.
Cheers and thanks for the advice,
-m
On Mon, Oct 27, 2014 at 12:18 AM, Murat Tasan wrote:
> Ah, good point, I hadn't thought of that detail.
> Would moving reg.fi
/Henrik
>
> On Mon, Oct 27, 2014 at 10:10 AM, Murat Tasan wrote:
>> Eh, after some flailing, I think I solved it.
>> I _think_ this pattern should guarantee that the finalizer function is
>> still present when needed:
>>
>> .STATE_CONTAINER <- new.env(parent = em
Hi all --- this is less a specific question and more general regarding
S3 classes.
I've noticed that quite a few very common default implementations of
generic functions (e.g. `unique`, `[`, `as.data.frame`) strip away
class information.
In some cases, it appears conditionals have been created to r
I've just recently noticed that using the na.last = NA setting with
order incurs a HUGE performance hit.
It appears that much of order(...) (the R wrapper, not the internal
calls) is written in as general a manner as possible to handle the
large number of input types.
But the canonical case of orde
10 matches
Mail list logo