Re: [R] Problem with do.call().

2014-03-28 Thread Rolf Turner
On 29/03/14 01:34, peter dalgaard wrote: On 28 Mar 2014, at 02:37 , Rolf Turner wrote: So there you are. Feel enlightened? Somewhat, actually, but not to such an extent as to have reached nirvana. "Promises" blow me away. Here's the most useful part of the post: to get what you want,

Re: [R] Problem with do.call().

2014-03-28 Thread peter dalgaard
On 28 Mar 2014, at 02:37 , Rolf Turner wrote: >> >> So there you are. Feel enlightened? > > Somewhat, actually, but not to such an extent as to have reached nirvana. > "Promises" blow me away. > >> >> Here's the most useful part of the post: to get what you want, use >> >> do.call(plot,

Re: [R] Problem with do.call().

2014-03-28 Thread Duncan Murdoch
On 28/03/2014, 2:04 AM, Philippe Grosjean wrote: On 28 Mar 2014, at 00:57, Duncan Murdoch wrote: On 27/03/2014, 7:38 PM, Thomas Lumley wrote: You get what you wanted from do.call(plot,list(x=quote(x),y=quote(y))) By the time do.call() gets the arguments it doesn't know how y was originally

Re: [R] Problem with do.call().

2014-03-27 Thread Philippe Grosjean
On 28 Mar 2014, at 00:57, Duncan Murdoch wrote: > On 27/03/2014, 7:38 PM, Thomas Lumley wrote: >> You get what you wanted from >> >> do.call(plot,list(x=quote(x),y=quote(y))) >> >> By the time do.call() gets the arguments it doesn't know how y was >> originally computed, just what values it has

Re: [R] Problem with do.call().

2014-03-27 Thread Rolf Turner
On 28/03/14 12:49, Duncan Murdoch wrote: On 27/03/2014, 7:17 PM, Rolf Turner wrote: I was under the impression that do.call(foo,list(x=x,y=y)) should yield the same result as foo(x,y). However if I do x <- 1:10 y <- (x-5.5)^2 do.call(plot) I get the expected plot but

Re: [R] Problem with do.call().

2014-03-27 Thread Duncan Murdoch
On 27/03/2014, 7:38 PM, Thomas Lumley wrote: You get what you wanted from do.call(plot,list(x=quote(x),y=quote(y))) By the time do.call() gets the arguments it doesn't know how y was originally computed, just what values it has. This works, but it doesn't make sense to me. The arguments end

Re: [R] Problem with do.call().

2014-03-27 Thread Duncan Murdoch
On 27/03/2014, 7:17 PM, Rolf Turner wrote: I was under the impression that do.call(foo,list(x=x,y=y)) should yield the same result as foo(x,y). However if I do x <- 1:10 y <- (x-5.5)^2 do.call(plot) I get the expected plot but with the y-values (sur

Re: [R] Problem with do.call().

2014-03-27 Thread Thomas Lumley
You get what you wanted from do.call(plot,list(x=quote(x),y=quote(y))) By the time do.call() gets the arguments it doesn't know how y was originally computed, just what values it has. -thomas On Thu, Mar 27, 2014 at 6:17 PM, Rolf Turner wrote: > > > I was under the impression that > >