Displaying 7 results from an estimated 7 matches for "klmr".
Did you mean:
klm
2016 Oct 02
5
On implementing zero-overhead code reuse
I'm looking for a way to approximate the "zero-overhead" model of code
reuse available in languages like Python, Perl, etc.
I've described this idea in more detail, and the motivation for this
question in an earlier post to R-help
(https://stat.ethz.ch/pipermail/r-help/2016-September/442174.html).
(One of the responses I got advised that I post my question here instead.)
The
2016 Oct 04
0
On implementing zero-overhead code reuse
Check out ?klmr/modules? on Github (distinct from CRAN?s ?modules?!). It
looks pretty much exactly like what you want:
https://github.com/klmr/modules
It has an extensive README and vignette explaining the usage.
Cheers,
Konrad
--
Konrad Rudolph
On Sun, 2 Oct 2016 at 18:31 Kynn Jones <kynnjo at gmail.com&g...
2014 Apr 28
0
RFC: API design of package "modules"
...#39;foo', 'f1')
# Exposes `foo$f1`
bar = import('foo/bar')
# Exposes `bar$b1`, `bar$b2` ?
```
(4) Something else?
So this is my question: what do other people think? Which is the most
useful and least confusing alternative from the users? perspective?
[1]: https://github.com/klmr/modules
[2]: https://github.com/klmr/modules/blob/master/README.md#feature-comparison
[3] The original syntax for this was `import(foo)` and
`import(foo.bar)`, respectively, but Hadley convinced me to drop
non-standard argument evaluation. I?m still not convinced that NSE is
actually harmful here,...
2015 Dec 10
6
How do I reliably and efficiently hash a function?
...parent.env(f)
parent.env(f) = my_new_env
```
This is done so that the function `f` finds objects defined inside
that environment without having to attach it globally. However, for
bookkeeping purposes I need to preserve the original parent
environment ? hence the question.
[1]: https://github.com/klmr/modules/issues/66
2023 Aug 27
1
Calling a replacement function in a custom environment
...Am I overlooking something to make this work? And if not ? unless there?s a
concrete reason against it, could it be considered to add support for this
syntax, i.e. for calling a replacement function by `$`-subsetting the
defining environment, as shown above?
Cheers,
Konrad
--
Konrad Rudolph // @klmr
[[alternative HTML version deleted]]
2015 Dec 11
1
How do I reliably and efficiently hash a function?
In addition to what Charles wrote, you can also use 'local' if you don't
want a function that creates another function.
> f <- local({info <- 10; function(x) x + info})
> f(3)
[1] 13
best,
Mark
Op vr 11 dec. 2015 om 03:27 schreef Charles C. Berry <ccberry at ucsd.edu>:
> On Thu, 10 Dec 2015, Konrad Rudolph wrote:
>
> > I?ve got the following scenario:
2019 Oct 09
2
S3 lookup rules changed in R 3.6.1
tl;dr: S3 lookup no longer works in custom non-namespace environments as of
R 3.6.1. Is this a bug?
I am implementing S3 dispatch for generic methods in environments that are
not
packages. I am trying to emulate the R package namespace mechanism by
having a
?namespace? environment that defines generics and methods, but only exposes
the
generics themselves, not the methods.
To make S3 lookup work