search for: kynnjo

Displaying 20 results from an estimated 22 matches for "kynnjo".

Did you mean: kynn
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 03
4
On implementing zero-overhead code reuse
Hi Frederick, I described what I meant in the post I sent to R-help (https://stat.ethz.ch/pipermail/r-help/2016-September/442174.html), but in brief, by "zero overhead" I mean that the only thing needed for library code to be accessible to client code is for it to be located in designed directory. No additional meta-files, packaging/compiling, etc. are required. Best, G. On Sun, Oct
2009 May 19
4
Qs: The list of arguments, wrapping functions...
Hi. I'm pretty new to R, but I've been programming in other languages for some time. I have a couple of questions regarding programming with function objects. 1. Is there a way for a function to refer generically to all its actual arguments as a list? I'm thinking of something like the @_ array in Perl or the arguments variable in JavaScript. (By "actual" I mean the ones
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> wrote: > 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...
2009 May 20
10
How to google for R stuff?
Hi! I'm new to R programming, though I've been programming in other languages for years. One thing I find most frustrating about R is how difficult it is to use Google (or any other search tool) to look for answers to my R-related questions. With languages with even slightly more distinctive names like Perl, Java, Python, Matlab, OCaml, etc., usually including the name of the language
2016 Oct 03
2
On implementing zero-overhead code reuse
...-devel at r-project.org mailing list >>>>>> https://stat.ethz.ch/mailman/listinfo/r-devel >>>>>> >>>> >>> >>> On Sun, Oct 02, 2016 at 08:05:53PM -0400, Kynn Jones wrote: >>>> On Sun, Oct 2, 2016 at 8:01 PM, Kynn Jones <kynnjo at gmail.com> wrote: >>>>> Hi Frederick, >>>>> >>>>> I described what I meant in the post I sent to R-help >>>>> (https://stat.ethz.ch/pipermail/r-help/2016-September/442174.html), >>>>> but in brief, by "zero overhe...
2016 Oct 03
3
On implementing zero-overhead code reuse
..._____________________ > > >> R-devel at r-project.org mailing list > > >> https://stat.ethz.ch/mailman/listinfo/r-devel > > >> > > > > On Sun, Oct 02, 2016 at 08:05:53PM -0400, Kynn Jones wrote: > > On Sun, Oct 2, 2016 at 8:01 PM, Kynn Jones <kynnjo at gmail.com> wrote: > > > Hi Frederick, > > > > > > I described what I meant in the post I sent to R-help > > > (https://stat.ethz.ch/pipermail/r-help/2016-September/442174.html), > > > but in brief, by "zero overhead" I mean that the only...
2009 May 22
2
how to insert NULLs in lists?
I'm an experienced programmer, but learning R is making me lose the little hair I have left... > list(NULL) [[1]] NULL > length(list(NULL)) [1] 1 > x <- list() > x[[1]] <- NULL > x list() > length(x) [1] 0 >From the above experiment, it is clear that, although one can create a one-element list consisting of a NULL element, one can't get the same result by
2016 Oct 03
0
On implementing zero-overhead code reuse
...gt;> ______________________________________________ > >> R-devel at r-project.org mailing list > >> https://stat.ethz.ch/mailman/listinfo/r-devel > >> > On Sun, Oct 02, 2016 at 08:05:53PM -0400, Kynn Jones wrote: > On Sun, Oct 2, 2016 at 8:01 PM, Kynn Jones <kynnjo at gmail.com> wrote: > > Hi Frederick, > > > > I described what I meant in the post I sent to R-help > > (https://stat.ethz.ch/pipermail/r-help/2016-September/442174.html), > > but in brief, by "zero overhead" I mean that the only thing needed for > &gt...
2016 Oct 03
0
On implementing zero-overhead code reuse
...t; > >> R-devel at r-project.org mailing list >> > >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > >> >> > >> >> On Sun, Oct 02, 2016 at 08:05:53PM -0400, Kynn Jones wrote: >> > On Sun, Oct 2, 2016 at 8:01 PM, Kynn Jones <kynnjo at gmail.com> wrote: >> > > Hi Frederick, >> > > >> > > I described what I meant in the post I sent to R-help >> > > (https://stat.ethz.ch/pipermail/r-help/2016-September/442174.html), >> > > but in brief, by "zero overhead" I...
2016 Oct 03
0
On implementing zero-overhead code reuse
Martin, thanks for that example. It's definitely eye-opening, and very good to know. The installation business, however, is still a killer for me. Of course, it's a trivial step in a simple example like the one you showed. But consider this scenario: suppose I perform an analysis that I may publish in the future, so I commit the project's state at the time of the analysis, and tag
2009 Jun 12
1
Fast JSON <-> R converter?
Is there a *fast* converter between JSON and R? I'm aware of the rjson package, but it is implemented in R, and it is too slow for my purposes. TIA! kynn [[alternative HTML version deleted]]
2009 Jun 08
0
How to explore R internals through gdb?
Hi everyone. I'm trying to learn my way around the R internals. I've gone pretty much as far as I can go with the information given in Writing R Extensions and R Internals, but I still have a lot of questions, too many in fact to post them to the r-devel list. But I think I could answer many of these if I could just step through R's execution during some basic operations. What
2009 Jun 13
1
conditional dependencies & loading
Hi! I'm working on a package that must convert data to and from JSON. For this, it can use either the rjson package, or preferably, the faster RJSONIO package. I have two related questions about this. First, how can I specify that the package depends on *either* RJSONIO *or* rjson? (I.e. both are not required.) Second, what's the best-practice R idiom for such conditional loading?
2009 Jun 18
1
ScalarLong?
I was surprised to see that there is a ScalarInteger function in Rinlinedfuns.h, but nothing like ScalarLong. How can one create an R-integer from a C long? TIA! kynn [[alternative HTML version deleted]]
2009 Jun 25
1
R data inspection under gdb?
Hi, everyone. I'm trying to debug an R-module, written in C, and I'm using gdb for this. How can I print "standard" R objects from within C code? BTW, I'm familiar with the advice to use R_PV given in Writing R Extensions, but it's not working for me. E.g., I get (gdb) p R_PV(x) $1 = void and yet (gdb) p *x $2 = {sxpinfo = {type = 16, obj = 0, named = 0, gp = 0,
2009 Jun 02
1
How to generate R objects in C?
I'm in the process of coding a parser (in C) to generate R entities (vectors, lists, etc.) from a text description (different from R). The basic parser works, and now I need to tell it how to create R entities. I need to be able to create character vectors (for unicode strings), integers, floats, unnamed lists, named lists, boolean values, and NA. With the exception of the two types of lists
2009 Jun 12
1
Issues converting from JSON to R
When converting from JSON to R it seems logical that a JSON array would correspond to an "unnamed" R list, while a JSON object would correspond to a "named" R list. E.g. JSON: [1, 3.1415927, "foo", false, null] => R: list(1, 3.1415927, "foo", FALSE, NA); and JSON { "int": 1, "float": 3.1415927, "string": "foo",
2009 May 23
1
Can a function know what other function called it?
Suppose function foo calls function bar. Is there any way in which bar can find out the name of the function that called it, "foo"? There are two generalization to this question that interest me. First, can this query go farther up the call stack? I.e. if bar now calls baz, can baz find out the name of the function that called the function that called it, i.e. "foo"?
2009 Jun 26
1
bug in Rf_PrintValue ?
I'm very green with R, so maybe this is not a bug, but it looks like one to me. The following program segfaults at the second call to Rf_PrintValue(). To failure depends on the value of the y-string. E.g., if I change it from "coverage" to, say, "COVERAGE", the segfault does not occur. /* bug.c */ #include <stdio.h> #include <Rinternals.h> #include