Re: [Rd] call / do.call expression too big

2011-06-04 Thread Hadley Wickham
> I completely understand why this happens, yet I was wondering if there is an > alternative to call/do.call that constructs the call in an different way so > that the actual call object is somewhat more compact and does not contain > all the data that was involved in the function. For example one

Re: [Rd] call / do.call expression too big

2011-06-04 Thread Henrique Dallazuanna
Try this: args <- list(data=quote(cars), formula=dist~speed) On Sat, Jun 4, 2011 at 7:49 PM, Jeroen Ooms wrote: > I am designing a remote procedure protocol for R, which basically performs a > do.call on data and arguments supplied by a client. However, I am > experiencing unfortunate behavior o

[Rd] call / do.call expression too big

2011-06-04 Thread Jeroen Ooms
I am designing a remote procedure protocol for R, which basically performs a do.call on data and arguments supplied by a client. However, I am experiencing unfortunate behavior of the do.call function. The function do.call seems to serialize all objects in the args list, resulting in an enormous ex

[Rd] Does anybody successfully built latest R on AIX 5.3?

2011-06-04 Thread Xiaobo Gu
__ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Interfacing a C++ class

2011-06-04 Thread Simon Urbanek
On Jun 4, 2011, at 10:31 AM, soeren.vo...@uzh.ch wrote: > Hello > > Apologies for cross-posting, the discussion should (if) go to R-devel, but I > also want to reach the rcpp-devel people. > > My C++ class FOO is a module available through Rcpp, and it works fine and is > -- so far -- bug fre

Re: [Rd] S4 class, passing argument names to function, modify original

2011-06-04 Thread soeren . vogel
On 04.06.2011, at 15:41, Martin Morgan wrote: > On 06/04/2011 03:07 AM, soeren.vo...@uzh.ch wrote: > >> Hello, an S4 class "Foo" is defined with a setter, $. For several reasons, >> the setter calls a function, .foo.update(). However, bypassing the argument >> names of the setter does not work.

[Rd] Interfacing a C++ class

2011-06-04 Thread soeren . vogel
Hello Apologies for cross-posting, the discussion should (if) go to R-devel, but I also want to reach the rcpp-devel people. My C++ class FOO is a module available through Rcpp, and it works fine and is -- so far -- bug free. With trying to further develop my R package, I thought it was a good

Re: [Rd] S4 class, passing argument names to function, modify original

2011-06-04 Thread Martin Morgan
On 06/04/2011 03:07 AM, soeren.vo...@uzh.ch wrote: Hello, an S4 class "Foo" is defined with a setter, $. For several reasons, the setter calls a function, .foo.update(). However, bypassing the argument names of the setter does not work. Question 1: Why not and how can I fix this? Question 2: Wh

Re: [Rd] S4 Slot assignment within function

2011-06-04 Thread Martin Morgan
On 06/03/2011 02:03 PM, mcguirebc wrote: Is there a simple way to assign values to S4 slots from within a function? Doing this doesn't work: assign_slot<-function(x){ assign("OBJECT@slot",x,envir=parent.env(environment()) } assign_slot(x) All I get from this is a new object with the nam

Re: [Rd] C-Side: Applying a function (given as param) to data (given as param)

2011-06-04 Thread Jeff Ryan
Oliver, For an example of moving averages, take a look at the C source of the xts and TTR packages. The sources are browsable on R-forge. In short, REAL etc are functions to extract the data of an SEXP. They need to match the types coming in. So your C needs to check the type and branch accor

Re: [Rd] C-Side: Applying a function (given as param) to data (given as param)

2011-06-04 Thread Duncan Murdoch
On 11-06-03 4:19 PM, oliver wrote: On Fri, Jun 03, 2011 at 11:14:39AM -0500, Douglas Bates wrote: On Fri, Jun 3, 2011 at 5:17 AM, oliver wrote: Hello, I'm implementing a package (C-extension), where one function gets data and a function that needs to be applied to the data. I want to apply t

Re: [Rd] S4 Slot assignment within function

2011-06-04 Thread Duncan Murdoch
On 11-06-03 5:03 PM, mcguirebc wrote: Is there a simple way to assign values to S4 slots from within a function? Doing this doesn't work: assign_slot<-function(x){ assign("OBJECT@slot",x,envir=parent.env(environment()) } assign_slot(x) All I get from this is a new object with the name O

Re: [Rd] C-Side: Applying a function (given as param) to data (given as param)

2011-06-04 Thread oliver
On Fri, Jun 03, 2011 at 11:14:39AM -0500, Douglas Bates wrote: > On Fri, Jun 3, 2011 at 5:17 AM, oliver wrote: > > Hello, > > > > I'm implementing a package (C-extension), > > where one function gets data and a function > > that needs to be applied to the data. > > > > I want to apply the function

[Rd] S4 Slot assignment within function

2011-06-04 Thread mcguirebc
Is there a simple way to assign values to S4 slots from within a function? Doing this doesn't work: > assign_slot<-function(x){ assign("OBJECT@slot",x,envir=parent.env(environment()) } >assign_slot(x) All I get from this is a new object with the name OBJECT@slot, the slot assignment of OBJEC

[Rd] S4 class, passing argument names to function, modify original

2011-06-04 Thread soeren . vogel
Hello, an S4 class "Foo" is defined with a setter, $. For several reasons, the setter calls a function, .foo.update(). However, bypassing the argument names of the setter does not work. Question 1: Why not and how can I fix this? Question 2: What is the way to define either the function or the s