Re: [Rd] Qs: The list of arguments, wrapping functions...

2009-05-19 Thread Gabor Grothendieck
match.call() will return the call. merge.zoo in the zoo package uses it if you need an example. as.list(match.call()) will return a list. list(...) will return the ... arguments as a list. $.proto in the proto package allows one to write p$f where p is a proto object and f is a function and p$

Re: [Rd] Qs: The list of arguments, wrapping functions...

2009-05-19 Thread Kynn Jones
Thanks for your replies! The will require some study on my part, which is good: a lot to learn. KJ [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Qs: The list of arguments, wrapping functions...

2009-05-19 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > Wacek Kusnierczyk wrote: > >> Kynn Jones wrote: >> >> >> >>> In general, I'm looking for all the information I can find on the subject of >>> dynamic function definition (i.e. using code to automate the definition of >>> functions at runtime). I'm most interes

Re: [Rd] Qs: The list of arguments, wrapping functions...

2009-05-19 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > Kynn Jones wrote: > > >> In general, I'm looking for all the information I can find on the subject of >> dynamic function definition (i.e. using code to automate the definition of >> functions at runtime). I'm most interested in introspection facilities and >> dynamic

Re: [Rd] Qs: The list of arguments, wrapping functions...

2009-05-19 Thread Wacek Kusnierczyk
Kynn Jones wrote: > 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

Re: [Rd] Qs: The list of arguments, wrapping functions...

2009-05-19 Thread hadley wickham
> 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 that > were actually passed, as opposed to its formal arguments, as returned

Re: [Rd] Qs: The list of arguments, wrapping functions...

2009-05-19 Thread Steve Weston
On Tue, May 19, 2009 at 4:22 PM, Kynn Jones wrote: > 2. I have a package in which most of the functions have the form: > > the.function <- function(some, list, of, params) { >    return( some.other.function(the.list.of.params.to.this.function)); > } > > Is there a way that I can use a loop to def

[Rd] Qs: The list of arguments, wrapping functions...

2009-05-19 Thread Kynn Jones
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

Re: [Rd] readBin on binary non-blocking connections (Windows & Unix differences/bugs)

2009-05-19 Thread Jeff Ryan
R-devel: I'll escalate this to a bug report once I can fully document, but something is seriously wrong with readBin on non-blocking connections. >From ?readBin Value: For 'readBin', a vector of appropriate mode and length the number of items read (which might be less than 'n'). On W

[Rd] package level connection API

2009-05-19 Thread Romain Francois
Hello, In 2006 Jeffrey Horner proposed [1,2] a patch to allow package level access to the connection API from C code. As I'm involved in a few packages that would benefit from this exposure, I felt I would warm the discussion up. Does this stand a chance of happening ? Romain [1] http://to

Re: [Rd] Automatic Differentiation for R

2009-05-19 Thread Forth, Shaun
Thanks for your interest in this topic. In the AD community we are used to dealing with essentially arbitrarily complex computer code. Some Fortran and C activities have looked at applications such as global climate models and computational fluid dynamics codes for aerospace design. Fortran

Re: [Rd] About " Error: C stack usage is too close to the limit"

2009-05-19 Thread goon83
Hi Simon, thanks for your information, I have tried to set "R_CStackLimit = (uintptr_t)-1" after Rf_initialize_R, but i don't know which Rf_initialize_R, because i found several in my source code. I had tried to set it in some place, but it still don't work. Strangely, i add "R_CStackL

Re: [Rd] Automatic Differentiation for R

2009-05-19 Thread Gabor Grothendieck
On Tue, May 19, 2009 at 9:08 AM, Martin Maechler wrote: > [MM stumbling over on old thread ... he'd be interested] > >> "GaGr" == Gabor Grothendieck >>     on Wed, 15 Apr 2009 09:53:18 -0400 writes: > >    GaGr> Not sure if this is sufficient for your needs but R does include > symbolic

Re: [Rd] stringsAsFactors .... in expand.grid() etc

2009-05-19 Thread Martin Maechler
> "RT" == Rolf Turner > on Tue, 19 May 2009 11:02:08 +1200 writes: RT> On 19/05/2009, at 10:20 AM, Steve Lianoglou wrote: >> Hi all, >> >> I've (tried) to look through the bug tracker, and gmane-search the >> R list to >> see if this has been mentioned befo

Re: [Rd] Automatic Differentiation for R

2009-05-19 Thread John C Nash
Martin (see below) gives a good explanation of the difference between AD and symbolic differentiations. I'm of the opinion we can use both. However, the real issue as far as I'm concerned (from an optimizer's point of view, which may also be that of ODE and PDE folk) is that right now none of t

Re: [Rd] Automatic Differentiation for R

2009-05-19 Thread Martin Maechler
[MM stumbling over on old thread ... he'd be interested] > "GaGr" == Gabor Grothendieck > on Wed, 15 Apr 2009 09:53:18 -0400 writes: GaGr> Not sure if this is sufficient for your needs but R does include symbolic GaGr> differentiation, see ?D, and the Ryacas and rSymPy G

Re: [Rd] S4 method dispatch and namespaces: why is default method selected

2009-05-19 Thread Michał Bojanowski
Hi Martin, >> However, when I put all these in a package with Depends field in >> DESCRIPTION having: methods, pixmap, and with the following namespace: >> >> >> importFrom("graphics", "plot") >> exportClasses("myclass") >> exportMethods("plot") >> >> >> things stop working (this is from package t

Re: [Rd] was: Problem building (binary) packages for Windows

2009-05-19 Thread Duncan Murdoch
On 18/05/2009 5:47 AM, Peter Ruckdeschel wrote: Dear Martin, Uwe and Brian thanks for your comments --- point taken: On Sat, 16 May 2009, Martin Maechler wrote: "UweL" == Uwe Ligges on Fri, 15 May 2009 20:48:03 +0200 writes: [.] >> Thank you for clarifyi

Re: [Rd] About " Error: C stack usage is too close to the limit"

2009-05-19 Thread Simon Urbanek
On May 19, 2009, at 4:30 AM, goon83 wrote: Hi everyone! I meet one problem when embedding R in C code, when I run the the R code in one child thread , it always print error info: Error: C stack usage is too close to the limit I also try to set R_CStackLimit = (uintptr_t)-1 to disab

Re: [Rd] was: Problem building (binary) packages for Windows

2009-05-19 Thread Martin Maechler
> "PetRd" == Peter Ruckdeschel > on Mon, 18 May 2009 11:47:11 +0200 writes: PetRd> Dear Martin, Uwe and Brian PetRd> thanks for your comments --- point taken: PetRd> On Sat, 16 May 2009, Martin Maechler wrote: >>> "UweL" == Uwe Ligges >>> on Fri, 15 May